fix back/forward button navigation