Fix major goofup in delete logic