Fixes history.pushState().