small tweaks to error messages and handling.