diff --git a/include/wrapping_dap_chain_datum.h b/include/wrapping_dap_chain_datum.h
index bfbdeb560f816d63e70d1f6c161fa6f11941b7e6..fd25630dd74d4512b77b4dacc9a08f5bfb2293fd 100644
--- a/include/wrapping_dap_chain_datum.h
+++ b/include/wrapping_dap_chain_datum.h
@@ -103,7 +103,7 @@ static PyTypeObject DapChainDatumObject_DapChainDatumObjectType = {
     0,                               /* tp_dictoffset */
     0,                               /* tp_init */
     0,                               /* tp_alloc */
-    PyDapChainDatumObject_new,       /* tp_new */
+    DapChainDatumObject_new,       /* tp_new */
 };
 /* -------------------------------- */
 
diff --git a/src/wrapping_dap_chain_datum.c b/src/wrapping_dap_chain_datum.c
index c9ef627bbb8388ece5e635803ea3ef9642fd1fe5..b48161949cb5351d6bed59d142a6ef70b184b28c 100644
--- a/src/wrapping_dap_chain_datum.c
+++ b/src/wrapping_dap_chain_datum.c
@@ -10,6 +10,7 @@ PyObject *PyDapChainDatumObject_new(PyTypeObject *type_object, PyObject *args, P
     if (!PyArg_ParseTuple(args, "h|S|n", &type_id, &bytes, &data_size))
         return NULL;
     PyDapChainDatumObject *obj = (PyDapChainDatumObject*)PyType_GenericNew(type_object, args, kwds);
-    obj->datum = dap_chain_datum_create(type_id, bytes, data_size);
+    void* bytes_v = (void *)PyBytes_AsString((PyObject*)bytes);
+    obj->datum = dap_chain_datum_create(type_id, bytes_v, data_size);
     return (PyObject *)obj;
 }