Miscellaneous fixes for game logic