Fixed tab reference in createVisit.