fixes issue where custom headers couldn't be set for client connections