fixed a bit position bug