fix always show errormsg