fix path when loading  templates