fixed bug in method Motor.drive