Fix host and path validation.