Fix edge case where last read in BAM is unpaired.
Fix case where cur was updated when pre was meant.