fix end game