fixed the delete records