fixed accelerometer bug