Fixed a bug in the input system