fix popup in window.location