populate_xheaders fix