changed router behavior to enhance browser history navigation