Correct errors

Build error for non-context build
order of setting context was wrong
diff --git a/src/MacMessage.c b/src/MacMessage.c
index 7a36d0c..9e06f98 100644
--- a/src/MacMessage.c
+++ b/src/MacMessage.c
@@ -599,9 +599,6 @@
 #endif
 	cn_cbor_errback cbor_error;
 
-#ifdef USE_CBOR_CONTEXT
-	context = &pMac->m_message.m_allocContext;
-#endif // USE_CBOR_CONTEXT
 
 	CHECK_CONDITION(IsValidMacHandle(hMac), COSE_ERR_INVALID_PARAMETER);
 	CHECK_CONDITION(IsValidRecipientHandle(hRecip), COSE_ERR_INVALID_PARAMETER);
@@ -612,6 +609,9 @@
 	pRecip->m_recipientNext = pMac->m_recipientFirst;
 	pMac->m_recipientFirst = pRecip;
 
+#ifdef USE_CBOR_CONTEXT
+	context = &pMac->m_message.m_allocContext;
+#endif // USE_CBOR_CONTEXT
 
 	pRecipients = _COSE_arrayget_int(&pMac->m_message, INDEX_MAC_RECIPIENTS);
 	if (pRecipients == NULL) {
diff --git a/test/sign.c b/test/sign.c
index 34412d3..f118742 100644
--- a/test/sign.c
+++ b/test/sign.c
@@ -148,7 +148,7 @@
 	/* */
 
 	int typ;
-	hEncObj = (HCOSE_SIGN)COSE_Decode(rgb, (int)cb, &typ, COSE_sign_object, NULL, NULL);
+	hEncObj = (HCOSE_SIGN)COSE_Decode(rgb, (int)cb, &typ, COSE_sign_object, CBOR_CONTEXT_PARAM_COMMA NULL);
 
 #if 0
 	int iSigner = 0;