Judgment of the Supreme Court, New York County (Brenda Soloff, J., at plea and sentence), rendered October 10, 1984, convicting defendant of robbery in the second degree and sentencing him to an indeterminate term of imprisonment of 1½ to 4½ years, to run consecutively to a previously imposed sentence, is unanimously modified, on the law, to vacate the sentence and the matter remanded for resentencing and otherwise affirmed.
Defendant’s claim on appeal that his guilty plea was improperly accepted by the court has not been preserved for our review. Defendant did not move to withdraw the plea or, apparently, to vacate the judgment. (People v Lopez, 71 NY2d 662, 665-666.) Moreover, were we to consider defendant’s claim on the merits, we would find that the court made an adequate inquiry to insure that defendant understood the nature of the charge and that the plea was intelligently entered. Under close questioning from the court, defendant admitted that he had displayed a screwdriver in order to impede his victim’s attempt to recover his wallet. (See, Penal Law § 160.00.)
The case, however, is remanded for resentencing because the court imposed the consecutive sentence under the mistaken impression that it was required to do so by Penal Law § 70.25 (2-b). The crime took place before the subdivision was *493effective. Accordingly, defendant was entitled to be sentenced under the law in effect at the time the crime was committed. (People v Oliver, 1 NY2d 152, 158; People v Corrigan, 139 AD2d 918, 919.) At the time of the crime, the court was not compelled to impose the sentences consecutively. Concur— Ross, J. P., Milonas, Kassal, Wallach and Rubin, JJ.