fixing sending of headers for content