Properly set the motor speed