diff --git a/beemgraphenebase/base58.py b/beemgraphenebase/base58.py
index b394249251a88d357a6978804096ab46a852cb1e..fc77ca4527cf673756c7d19d03a01dc696ae0b22 100644
--- a/beemgraphenebase/base58.py
+++ b/beemgraphenebase/base58.py
@@ -8,7 +8,7 @@ from builtins import object
 from builtins import chr
 from future.utils import python_2_unicode_compatible
 from binascii import hexlify, unhexlify
-from .py23 import py23_bytes, bytes_types, integer_types, string_types, text_type
+from .py23 import py23_bytes, py23_chr, bytes_types, integer_types, string_types, text_type
 import hashlib
 import sys
 import string
@@ -124,7 +124,7 @@ def base58decode(base58_str):
     leading_zeroes_count = 0
     for b in base58_text:
         if isinstance(b, integer_types):
-            n = n * 58 + BASE58_ALPHABET.find(chr(b))
+            n = n * 58 + BASE58_ALPHABET.find(py23_chr(b))
         else:
             n = n * 58 + BASE58_ALPHABET.find(b)
         if n == 0:
diff --git a/beemgraphenebase/py23.py b/beemgraphenebase/py23.py
index 8221e60c2db135b3251f58160340ff35388b829a..9d0e3943da180b95596cf231b85783b32c37fb10 100644
--- a/beemgraphenebase/py23.py
+++ b/beemgraphenebase/py23.py
@@ -2,7 +2,7 @@ from __future__ import absolute_import
 from __future__ import division
 from __future__ import print_function
 from __future__ import unicode_literals
-from builtins import bytes, int, str
+from builtins import bytes, int, str, chr
 import sys
 
 PY2 = sys.version_info[0] == 2
@@ -31,3 +31,10 @@ def py23_bytes(item, encoding=None):
             return bytes(item, encoding)
         else:
             return bytes(item)
+
+
+def py23_chr(item):
+    if PY2:
+        return chr(item)
+    else:
+        return bytes([item])
diff --git a/tests/beemgraphene/test_py23.py b/tests/beemgraphene/test_py23.py
index e07392ed08a30af3fe1b4301a20866bfa13e35b4..bfd195b6acb5f4a1237d80f46056b3d7862534e0 100644
--- a/tests/beemgraphene/test_py23.py
+++ b/tests/beemgraphene/test_py23.py
@@ -7,6 +7,7 @@ import pytest
 import unittest
 from beemgraphenebase.py23 import (
     py23_bytes,
+    py23_chr,
     bytes_types,
     integer_types,
     string_types,
@@ -105,10 +106,14 @@ class Testcases(unittest.TestCase):
     def test_string_types(self):
         a = 'abc'
         b = u'abc'
-        c = b'abc'
         self.assertTrue(isinstance(a, string_types))
         self.assertTrue(isinstance(b, string_types))
-        self.assertTrue(isinstance(c, string_types))
+
+    def test_chr(self):
+        BASE58_ALPHABET = b"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
+        self.assertEqual(BASE58_ALPHABET.find(py23_chr(4)), -1)
+        self.assertEqual(BASE58_ALPHABET.find(b"Z"), 32)
+        self.assertEqual(BASE58_ALPHABET.find(py23_bytes("Z", "ascii")), 32)
 
 
 if __name__ == '__main__':