Fixed Infinite Loop at end of game/ other fixes

Fixed Infinite Loop at end of game/ other fixes