better handling of localized errors