diff --git a/Makefile b/Makefile
index ff93581144936c5ff80f9be4188b9f5eaac589a8..b31bb96f9a8171ca7e783d064e60b3273cbcd3df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 PROJECT = yangson
-VERSION = 1.3.16
+VERSION = 1.3.17
 .PHONY = tags deps install-deps test
 
 tags:
diff --git a/yangson/datatype.py b/yangson/datatype.py
index 347715f0e3038f9bde7a6c18c4196f47d9b830d3..4d79d6240a1fd0fe5fbb69af26cb3572d4fb9064 100644
--- a/yangson/datatype.py
+++ b/yangson/datatype.py
@@ -528,12 +528,12 @@ class IdentityrefType(DataType):
             i1, s, i2 = raw.partition(":")
         except AttributeError:
             return None
-        return (i2, i1) if s else (i1, self.namespace)
+        return (i2, i1) if s else (i1, self.sctx.default_ns)
 
     def __contains__(self, val: QualName) -> bool:
         for b in self.bases:
             if not self.sctx.schema_data.is_derived_from(val, b):
-                self._set_error_info(error_message="not derived from " + b)
+                self._set_error_info(error_message="not derived from {1}:{0}".format(*b))
                 return False
         return True