fix issue with templates