fix some bugs in game control