fixing a bug introduced by the VisitRegistry redesign.