fix some problem in __main__