Fixed issue with custom headers that were not being added properly