End of game correction (now working)