fix mnemonic encode/decode