fix accidental global var