fixed error in browser history navigation