Fix bugs of InputTOU function.