bug fix on history prompt