Bugfix window.location