fix bugs in mole.py hf.py