Made some small modifications for error messages.