Fixed bug in game model(JS)