cleanup refs