headers were not being added properly