fix mod order err, chg hex encode/decode