fix runtime template compiling