Cosmetic changes to error messages

(cherry picked from commit ffa424d9d88dcd534272b154a3d9848df861914b)