fixed bugs in global.scala
Merge pull request #12 from hewolf/master

fixed bugs in global.scala