fixing delete sequence