fixing delete bug