Fixed a freezing bug in moo.py