Fix browser history navigation