Updated Service Provider to add headers to the output in any case