diff --git a/SMPInstr.cpp b/SMPInstr.cpp
index d18ce18d8c743577620cfc9a31ac4b251f123ce9..2c091e480b87a23e70cbbec11da60f5ca483129d 100644
--- a/SMPInstr.cpp
+++ b/SMPInstr.cpp
@@ -2752,6 +2752,12 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE
 	}
 #endif
 
+	/* if we have no block, we're not part of a function */
+	if(GetBlock()==NULL)
+		/* and so we should print that we belong to no function */
+                qfprintf(AnnotFile, "%10x %6d INSTR BELONGTO 0 %s\n", GetAddr(), this->SMPcmd.size, GetDisasm());
+
+
 	// Emit appropriate optimization annotations.
 	bool SDTInstrumentation = false;
 	switch (OptType) {
diff --git a/SMPProgram.cpp b/SMPProgram.cpp
index ce6a1439fdd9aaf72d30f67c3efeb19e32eaef14..42801385a8bb1aa0295e52cab51fe22128337963 100644
--- a/SMPProgram.cpp
+++ b/SMPProgram.cpp
@@ -88,7 +88,7 @@ ea_t HighestCodeAddress;
 //  using an index register?
 bool MDIsIndexedAccess(ea_t InstAddr, ea_t GlobalAddr) {
 #if IDA_SDK_VERSION < 600
-	int InstrLen = ua_anao(InstAddr);
+	int InstrLen = ua_ana0(InstAddr);
 #else
 	int InstLen = decode_insn(InstAddr);
 #endif