fix some issues on history