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

issue #3935 Fix some bugs.