fix window.location.pathname