Added correct error messages.