Small changes to improve exception messages