Fix deleted record recognition