added a check to determine if the record is in the pool and correctly clean it up