Update window.location assignment to use href property