Fixed unsetting of error messages