Bug in delete