fixing delete behavior