fix bug: header not set
refractor