Fix bugs reading paired files