fixed template loader issue