encodeHEADERS fixed