fix bits swap