bug fix 316

which may cause error loading a template