fix for setting template