Fixed accelerometer index bug