getErrors() fix

clear previous errors