Fix some bugs in helpcmd.py