refactoring

diff --git a/libasn1compiler/asn1c_out.h b/libasn1compiler/asn1c_out.h
index f604687..7e2abfd 100644
--- a/libasn1compiler/asn1c_out.h
+++ b/libasn1compiler/asn1c_out.h
@@ -69,6 +69,8 @@
 			_tmp.default_cb(&_tmp);			\
 		);						\
 		arg->embed--;					\
+		if(ev->expr_type != A1TC_EXTENSIBLE)		\
+			OUT(";\n");				\
 		assert(arg->target->target == OT_TYPE_DECLS);	\
 		REDIR(saved_target);				\
 	} while(0)
diff --git a/libasn1compiler/asn1compiler.c b/libasn1compiler/asn1compiler.c
index dd51156..0159da1 100644
--- a/libasn1compiler/asn1compiler.c
+++ b/libasn1compiler/asn1compiler.c
@@ -84,6 +84,9 @@
 			expr->_lineno);
 
 		ret = type_cb(arg);
+
+		if(arg->target->destination[OT_TYPE_DECLS].indent_level == 0)
+			OUT(";\n");
 	} else {
 		ret = -1;
 		/*
@@ -112,6 +115,11 @@
 	}
 
 	if(ret == -1) {
+		FATAL("Cannot compile \"%s\" (%x:%x) at line %d",
+			arg->expr->Identifier,
+			arg->expr->expr_type,
+			arg->expr->meta_type,
+			arg->expr->_lineno);
 		OUT("#error Cannot compile \"%s\" (%x/%x) at line %d\n",
 			arg->expr->Identifier,
 			arg->expr->meta_type,