fix some bugs in source and config file