fix empty headers bug