InputDevice redefined in later stage of the code