fixes a delete bug