fix global var dependency