Fixing references to assets in templates