Fixed undeleted records error