fix the delete bug