Fix bug with acceleration