[BUGFIX] Wrong method called in encode_hex()

Changed `decode` to `encode` in `encode_hex()`