fix: prevent error when error is cleared