fixed getting next to get records that have been marked as invalid