Fixed issue with input reading.