Added method has_errors