Improved header injector (fixed bugs if header has no some attributes).