Various bugfixes and fixed few typos in InputManager class