Call get_config() only once, not twice