fixed minor bug for the visualizer