Fixed double delete bug.