Fixed EOS being returned when 0 bytes should be read.