templatedir added.