fix set_header

still untested