fixed bugs caused from code added from ncsuwhen merging in src/query
syntax fix in core/global.c