Fixed generating config for template