fixed failure in accelerometer.js