fixed var declarations with side effects