Fix back/forward bug