Fix use of .pushState and .replaceState and backwards / forwards navigation