Fix issue with opening closed sessions.