Accelerometer hack to avoid leaking memory