only cleanup if there is a source ref