Altering the way headers are set

This seems to work for me where as the current implementation does not.  See issue #105