fix headers parsing