Fixing bug where the Host header was not being set properly