Fixed bug in read_nonempty