fix some bugs in regular.py