Added clearError() as setError(null) does not work.