fix end game issue WIP