Fixed error with motor direction