fix nb_read while 0