Changed from atoi to atol in the stream reader.