Altering the way headers are set - this seems to work for me where as th...

...e current implementation does not