Fixed an important bug with the input manager.