Fixes bug with opening new sessions.