fix some bugs to make the program run