fix a bug in galcontrol.py