Fixing bug where lastAcceleration wasn't updated properly.