fixed the processing of pair-end reads