fixed accelerometer bug on ios and orientation bug