Small improvement for better error reporting.