Fixed bug on input when input was illegal.