adding workaround for encoding of long multibyte headers. Saves my head from