restore main for visualizer