Some blind (i.e., untested) fixes to gui.py.