Fix bug with InputManager