issue #3935 Fix some bugs.
Merge pull request #341 from SmallAiTT/tests_js_3.0_ccgame

issue #3935 Fix some bugs.