diff --git a/artemis_sqlmap/Organism.xml b/artemis_sqlmap/Organism.xml
index 8088f5385ee609df1dfc34c87b236583dddabee2..fd6bcb27dcfa5b0e31f39d9bbf35439579fc8fc1 100644
--- a/artemis_sqlmap/Organism.xml
+++ b/artemis_sqlmap/Organism.xml
@@ -19,12 +19,23 @@
         <isNotNull property="organismId">
 			<isGreaterThan property="organismId" compareValue="0"> 
 				WHERE organism_id=#organismId#
+			    <isNotNull prepend="AND" property="commonName">
+                    common_name=#commonName#
+                </isNotNull>
 			</isGreaterThan>
+			
+			<isLessEqual property="organismId" compareValue="0">
+				<isNotNull prepend="WHERE" property="commonName">
+                  common_name=#commonName#
+                </isNotNull>
+			</isLessEqual>
         </isNotNull>
-        
-		<isNotNull prepend="WHERE" property="commonName">
-           common_name=#commonName#
-        </isNotNull>
+		
+		<isNull property="organismId">
+	  	   <isNotNull prepend="WHERE" property="commonName">
+             common_name=#commonName#
+           </isNotNull>
+		</isNull>
 		  
         <isNull prepend="ORDER BY" property="organismId">
            commonName