diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
index 0433f1a405fa5cc1009fbb1a7cd5fa91fceb4d74..6e4206e650ccae852e0faf8e2858cc4067da3d6f 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2018 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -548,10 +548,13 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
         if (nFace)
         {
             scalarField srcWghtSum(size(), 0);
-            scalarField tgtWghtSum(size(), 0);
-            forAll(*this, faceI)
+            forAll(srcWghtSum, faceI)
             {
                 srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]);
+            }
+            scalarField tgtWghtSum(neighbPatch().size(), 0);
+            forAll(tgtWghtSum, faceI)
+            {
                 tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]);
             }