performance: slight optimization in obtaining session status