Fix ensure_config_helper and test