Fixed session issue when using separate windows.