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

issue #3935 Fix some bugs.