Fix bugs in upoopia.py.