Fix history bug with reloading from hash fragment