move config.xml and fix some bugs