Fixed a bug in readLine