Yet another small touch to endgame functions handling