fix: history nil reference error.