Fix the window.open() method.