Get unpublished and published references in a save way - the may be removed

@jone