printer yang BUGFIX always set schema printer type
diff --git a/src/printer_yang.c b/src/printer_yang.c
index 90b08cf..c9f0f21 100644
--- a/src/printer_yang.c
+++ b/src/printer_yang.c
@@ -2215,9 +2215,9 @@
     struct lys_ypr_ctx pctx_ = {
         .out = out,
         .level = 0,
+        .options = options,
         .module = module,
-        .schema = LYS_YPR_PARSED,
-        .options = options
+        .schema = LYS_YPR_PARSED
     }, *pctx = &pctx_;
 
     ly_print_(pctx->out, "%*smodule %s {\n", INDENT, module->name);
@@ -2280,8 +2280,11 @@
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lys_ypr_ctx pctx_ = {
-        .out = out, .level = 0, .module = submodp->mod, .schema = LYS_YPR_PARSED,
-        .options = options
+        .out = out,
+        .level = 0,
+        .options = options,
+        .module = submodp->mod,
+        .schema = LYS_YPR_PARSED
     }, *pctx = &pctx_;
 
     ly_print_(pctx->out, "%*ssubmodule %s {\n", INDENT, submodp->name);
@@ -2331,7 +2334,13 @@
 LY_ERR
 yang_print_compiled_node(struct ly_out *out, const struct lysc_node *node, uint32_t options)
 {
-    struct lys_ypr_ctx pctx_ = {.out = out, .level = 0, .module = node->module, .options = options}, *pctx = &pctx_;
+    struct lys_ypr_ctx pctx_ = {
+        .out = out,
+        .level = 0,
+        .options = options,
+        .module = node->module,
+        .schema = LYS_YPR_COMPILED
+    }, *pctx = &pctx_;
 
     yprc_node(pctx, node);
 
@@ -2344,7 +2353,13 @@
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysc_module *modc = module->compiled;
-    struct lys_ypr_ctx pctx_ = {.out = out, .level = 0, .module = module, .options = options}, *pctx = &pctx_;
+    struct lys_ypr_ctx pctx_ = {
+        .out = out,
+        .level = 0,
+        .options = options,
+        .module = module,
+        .schema = LYS_YPR_COMPILED
+    }, *pctx = &pctx_;
 
     ly_print_(pctx->out, "%*smodule %s {\n", INDENT, module->name);
     LEVEL++;