unify the codes of light box
fix a crash of Hegemony Mode