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

issue #3935 Fix some bugs.