Fix a bug and add a template for genthemall config.