minor fixes in visualization.py