Fixed py3 issues.
Added handling of visualizer crash.