fixed stucked text bug when going through previous commands