fix duplicate history while url has query.
Merge pull request #744 from jonakyd/topics/fix-route-with-query

fix duplicate history while url has query.