fix bit pair ordering