fixed set header function