Fix incorrect order of key and value.
Fix a bug in the game.