Fix updating window history.