fix the bug of when the left weight is equal to right weight ,the encoding is mismatch