Fix global var bug, thanks jmar777