fix header encoding with spaces