cleanup the references.