improved error message for #291