Added clearErrors() for linear