config: ensure config is generated before keys