fix fallback for system/app domains in template
fix fallbacks better