Fixing bug in delete introduced by merge