fix bin 16, bin 32 encode