diff --git a/init.lua b/init.lua
index 58a04fe011e0163b4e2b481000f110cc81401e59..e5f7be3714663e0372ed9efe14b0661284931c4e 100644
--- a/init.lua
+++ b/init.lua
@@ -273,9 +273,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
 				nixz = nixz + 1
 				vi = vi + 1
 			end
-			nixz = nixz - sidelen
+			nixz = nixz - sidelen --shift the 2D index back
 		end
-		
+		nixz = nixz + sidelen --shift the 2D index up a layer
 	end
 	
 	--send data back to voxelmanip