fixed the error with the delete.