fix template loader, add recompile_templates command