Bugfixes for Motion Sensor