changed router so that it will handle popstate

in firefox