Fixed a few bugs in the sensors and motor.