bits enconding fix