Fixed check when reading in pairs