remove window.location redirect