added checks for crazy records

added checks for crazy records