fixes to multibyte packing