Fix syntax errors in the visualizer.js