Fixing HistoryRouter on Firefox and some other bugs