fixed var scope