fix incorrect assertion

it made a problem if no tuple were read.