Fixed the usage of InputManager