Fix the delete method.