Fix issue with deleting records.