fixes to visualization.js