diff --git a/src/path.c b/src/path.c
index 3876762..9a77414 100644
--- a/src/path.c
+++ b/src/path.c
@@ -708,7 +708,7 @@
 
                 /* store the value */
                 LOG_LOCSET(key, NULL);
-                ret = lyd_value_store(ctx_node->module->ctx, &p->value, ((struct lysc_node_leaf *)key)->type, val, val_len, 0, 0,
+                ret = lyd_value_store(ctx, &p->value, ((struct lysc_node_leaf *)key)->type, val, val_len, 0, 0,
                         NULL, format, prefix_data, LYD_HINT_DATA, key, NULL);
                 LOG_LOCBACK(1, 0);
                 LY_CHECK_ERR_GOTO(ret, p->value.realtype = NULL, cleanup);
@@ -736,7 +736,7 @@
             /* names (keys) are unique - it was checked when parsing */
             LOGVAL(ctx, LYVE_XPATH, "Predicate missing for a key of %s \"%s\" in path.",
                     lys_nodetype2str(ctx_node->nodetype), ctx_node->name);
-            ly_path_predicates_free(ctx_node->module->ctx, *predicates);
+            ly_path_predicates_free(ctx, *predicates);
             *predicates = NULL;
             ret = LY_EVALID;
             goto cleanup;
@@ -771,10 +771,12 @@
         }
 
         /* store the value */
-        LOG_LOCSET(ctx_node, NULL);
-        ret = lyd_value_store(ctx_node->module->ctx, &p->value, ((struct lysc_node_leaflist *)ctx_node)->type, val, val_len, 0, 0,
+        if (ctx_node) {
+            LOG_LOCSET(ctx_node, NULL);
+        }
+        ret = lyd_value_store(ctx, &p->value, ((struct lysc_node_leaflist *)ctx_node)->type, val, val_len, 0, 0,
                 NULL, format, prefix_data, LYD_HINT_DATA, ctx_node, NULL);
-        LOG_LOCBACK(1, 0);
+        LOG_LOCBACK(ctx_node ? 1 : 0, 0);
         LY_CHECK_ERR_GOTO(ret, p->value.realtype = NULL, cleanup);
         ++(*tok_idx);
 
@@ -1091,7 +1093,7 @@
     }
     lref = (const struct lysc_type_leafref *)deref_leaf_node->type;
     LY_CHECK_GOTO(ret = ly_path_append(ctx, path2, path), cleanup);
-    ly_path_free(path2);
+    ly_path_free(ctx, path2);
     path2 = NULL;
 
     /* compile dereferenced leafref expression and append it to the path */
@@ -1099,7 +1101,7 @@
             &path2), cleanup);
     node2 = path2[LY_ARRAY_COUNT(path2) - 1].node;
     LY_CHECK_GOTO(ret = ly_path_append(ctx, path2, path), cleanup);
-    ly_path_free(path2);
+    ly_path_free(ctx, path2);
     path2 = NULL;
 
     /* properly parsed path must always continue with ')' and '/' */
@@ -1123,9 +1125,9 @@
     LY_CHECK_GOTO(ret = ly_path_append(ctx, path2, path), cleanup);
 
 cleanup:
-    ly_path_free(path2);
+    ly_path_free(ctx, path2);
     if (ret) {
-        ly_path_free(*path);
+        ly_path_free(ctx, *path);
         *path = NULL;
     }
     return ret;
@@ -1281,7 +1283,7 @@
 
 cleanup:
     if (ret) {
-        ly_path_free(*path);
+        ly_path_free(ctx, *path);
         *path = NULL;
     }
     LOG_LOCBACK(cur_node ? 1 : 0, 0);
@@ -1486,7 +1488,7 @@
 }
 
 void
-ly_path_free(struct ly_path *path)
+ly_path_free(const struct ly_ctx *ctx, struct ly_path *path)
 {
     LY_ARRAY_COUNT_TYPE u;
 
@@ -1495,7 +1497,7 @@
     }
 
     LY_ARRAY_FOR(path, u) {
-        ly_path_predicates_free(path[u].node->module->ctx, path[u].predicates);
+        ly_path_predicates_free(ctx, path[u].predicates);
     }
     LY_ARRAY_FREE(path);
 }
