diff --git a/src/parser_yin.c b/src/parser_yin.c
index 866d145..0fa9998 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -41,7 +41,7 @@
 #define IF_KW_PREFIX_END }
 
 enum YIN_ARGUMENT
-match_argument_name(char *name, size_t len)
+match_argument_name(const char *name, size_t len)
 {
     enum YIN_ARGUMENT arg = YIN_ARG_NONE;
     size_t already_read = 0;
@@ -100,16 +100,9 @@
 {
     LY_ERR ret = 0;
 
-    const char *prefix, *name, *elem;
+    const char *prefix, *name;
     size_t prefix_len, name_len;
 
-    /* check if root keyword is module or submodule */
-    ret = lyxml_get_element(xml_ctx, data, &prefix, &prefix_len, &name, &name_len);
-    LY_CHECK_ERR_RET(ret != LY_SUCCESS, LOGMEM(xml_ctx->ctx), LY_EMEM);
-    if (match_keyword(name) != YANG_MODULE && match_keyword(name) != YANG_SUBMODULE) {
-        LOGVAL(xml_ctx->ctx, xml_ctx->line, &xml_ctx->line, LYVE_SYNTAX, "Invalid keyword \"%s\", expected \"module\" or \"submodule\".", name);
-    }
-
     /* check if module/submodule has argument "name" */
     ret = lyxml_get_attribute(xml_ctx, data, &prefix, &prefix_len, &name, &name_len);
     LY_CHECK_ERR_RET(ret != LY_SUCCESS, LOGMEM(xml_ctx->ctx), LY_EMEM);
@@ -121,26 +114,41 @@
     size_t buf_len = 0, out_len = 0;
     int dynamic;
 
+    /* read name of module */
     ret = lyxml_get_string(xml_ctx, data, &buf, &buf_len, &out, &out_len, &dynamic);
     LY_CHECK_ERR_RET(ret != LY_SUCCESS, LOGMEM(xml_ctx->ctx), LY_EMEM);
-
     (*mod_p)->name = lydict_insert(xml_ctx->ctx, out, out_len);
+    LY_CHECK_ERR_RET(!(*mod_p)->name, LOGMEM(xml_ctx->ctx), LY_EMEM);
     return 0;
 }
 
 LY_ERR
 yin_parse(struct ly_ctx *ctx, const char *data, struct lysp_module **mod_p)
 {
-    LY_ERR ret = 0;
-    struct ly_parser_ctx context = {0};
-
+    LY_ERR ret = LY_SUCCESS;
+    enum yang_keyword kw = YANG_NONE;
     struct lyxml_context xml_ctx;
-    xml_ctx.ctx = ctx;
 
-    const char *prefix, *name, *elem;
+    memset(&xml_ctx, 0, sizeof xml_ctx);
+    xml_ctx.ctx = ctx;
+    xml_ctx.line = 1;
+
+    const char *prefix, *name;
     size_t prefix_len, name_len;
 
-    parse_submodule(&xml_ctx, &data, mod_p);
+    /* check if root keyword is module or submodule */
+    ret = lyxml_get_element(&xml_ctx, &data, &prefix, &prefix_len, &name, &name_len);
+    LY_CHECK_ERR_RET(ret != LY_SUCCESS, LOGMEM(xml_ctx.ctx), LY_EMEM);
+    kw = match_keyword(name);
+    if (kw != YANG_MODULE && kw != YANG_SUBMODULE) {
+        LOGVAL(xml_ctx.ctx, xml_ctx.line, &xml_ctx.line, LYVE_SYNTAX, "Invalid keyword \"%s\", expected \"module\" or \"submodule\".", name);
+    }
 
-    return LY_SUCCESS;
+    if (kw == YANG_SUBMODULE) {
+        (*mod_p)->submodule = 1;
+    }
+
+    ret = parse_submodule(&xml_ctx, &data, mod_p);
+
+    return ret;
 }
