bug in delete