compileTemplate ext context fix