fixed accellerometer bug