fixed a delete bug