fix last location save function, replace current url instead of pushing
new history entries