diff --git a/automatically-paginate-posts.php b/automatically-paginate-posts.php
index 88b95d229bc316ccbb1a855e8d4e08664537320c..58a7593996acb565db0dffdaeb203f479bd3c722 100644
--- a/automatically-paginate-posts.php
+++ b/automatically-paginate-posts.php
@@ -719,7 +719,7 @@ class Automatically_Paginate_Posts {
 					$new_blocks[] = $block;
 
 					if ( $this->is_at_end_for_pages( $key, $count ) ) {
-						continue;
+						break;
 					}
 
 					if (