Fixed a bug in the visualizer.