Fixed end of game popup so that it would disappear correctly