Headers were being overwritten