Fixed bug in reading standard out.