Fix bugs in game model