fixing global var