change for #1774: better error message