fix 'session' is not defined error due to  checkin d6433f0