Fixed an error when reading integers from the standard input.