template variables save and load properly