fix set_session method