Fixed a bug where the subrouted failed if the history wasn't initialized before
Fixed a wrong check on getHash
merge