Couple of bug fixes in delete