Fixed a bug in Input.