fix issue with attaching custom headers