Fixed order of level ending scripts.