fixied callbacks function bug for endGame Logic