fixed double delete bug