fix incorrect logic when loading session via NextStep document API