fix bug that error occurs while having custom helpTxt or exitTxt