minor tweaks to error reporting