Var fix

this relates to pull 4 on imathis's branch