fixed next server issues on template files