diff --git a/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java b/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
index <HASH>..<HASH> 100644
--- a/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
+++ b/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
@@ -1525,7 +1525,7 @@ public abstract class OptimizerNode implements Visitable<OptimizerNode>
 	
 	public boolean keepsUniqueProperty(FieldSet uniqueSet, int input) {
 		for (Integer uniqueField : uniqueSet) {
-			if (isFieldKept(uniqueField, input) == false) {
+			if (isFieldKept(input, uniqueField) == false) {
 				return false;
 			}
 		}
Fixed bug in uniqueness determination in optimizer node