Fix the problem with two open sessions.