fix the failure of a few global unit tests.
Merge pull request #28 from gcheng/global

fix the failure of a few global unit tests.