diff --git a/CEP/DP3/DPPP/test/tStationAdder.cc b/CEP/DP3/DPPP/test/tStationAdder.cc
index 54ca01d482ab2c900dcf27f7cfd45b5ad2cafe62..dfe6bbdb0b9c1f31b98ca5590572672ffc72578d 100644
--- a/CEP/DP3/DPPP/test/tStationAdder.cc
+++ b/CEP/DP3/DPPP/test/tStationAdder.cc
@@ -279,7 +279,7 @@ private:
     Cube<Complex> tmp=from.copy();
     Cube<Complex>::iterator tmpit=tmp.begin();
     Cube<Float>::const_iterator weightit=weights.begin();
-    for (; tmpit!=to.end() && weightit!=weights.end(); tmpit++, weightit++) {
+    for (; tmpit!=tmp.end() && weightit!=weights.end(); tmpit++, weightit++) {
       *tmpit *= *weightit;
     }
     to += tmp(IPosition(3,0,0,bl), IPosition(3,to.nrow()-1,to.ncolumn()-1,bl));
@@ -291,7 +291,7 @@ private:
     Cube<Complex> tmp=from.copy();
     Cube<Complex>::iterator tmpit=tmp.begin();
     Cube<Float>::const_iterator weightit=weights.begin();
-    for (; tmpit!=to.end() && weightit!=weights.end(); tmpit++, weightit++) {
+    for (; tmpit!=tmp.end() && weightit!=weights.end(); tmpit++, weightit++) {
       *tmpit *= *weightit;
     }
     to += conj(tmp(IPosition(3,0,0,bl), IPosition(3,to.nrow()-1,to.ncolumn()-1,bl)));