Fixed the bug where opening a new window would open two tabs.