some small fixes to scanviewer.py