Fix error messages for a couple cases.