now deletes code item properly