fix diff binary encoding