Fix some incorrect error messages.