Fixes to game finish events, skipping unnecessary actions after the game is finished and some tests