fixed template loading.