fixed a bug about global variables