fix core in getHeaderTagBuf() func