Fix some game-breaking bugs