Fixed bug where headers were passed as parameters