Fixed errors in accelerometer shim.