fix bugs and successfully run

DHC fix bugs for term