Fixed ignoring headers when rebuild