Changed the window.location hack to be more specific (and documented).