fix header variable bug