Changed removal of variables from index