ensure tempalte vars are set