Fixed delete bug