Adding some fixes for real-world battle-testing.