allow to use replaceState instead of pushState