diff --git a/transfer_service/retrieve_executor.py b/transfer_service/retrieve_executor.py
index 1d1407216f0ff2810baab1ef40e75dace339f8c1..fa3b15c37e7b26802f01d97f47df170137e4203e 100644
--- a/transfer_service/retrieve_executor.py
+++ b/transfer_service/retrieve_executor.py
@@ -14,7 +14,7 @@
 # * loop on each block and retrieve data
 #   - if the storage type is 'cold' (tape) perform a recall operation
 #     before the copy and a migrate operation after the copy
-#   - check if data associated to a VOSpace node has been copied 
+#   - check if data associated to a VOSpace node has been copied
 #     every time a block is retrieved
 #   - recursively update the 'async_trans' flag
 # * cleanup
@@ -191,16 +191,14 @@ class RetrieveExecutor(TaskExecutor):
                 #self.totalSize += fileSize
                 # check if the file is larger than a block size
                 if fileSize > self.maxBlockSize:
-                    # if the current block is not empty, "close" it, otherwise
-                    # use it and then create a new block
+                    # if the current block is not empty, "close" it,
+                    # otherwise use it
                     if blockSize > 0:
                         blockIdx += 1
                         fileInfo["blockIdx"] = blockIdx
-                        blockIdx += 1
                     else:
                         fileInfo["blockIdx"] = blockIdx
-                        blockIdx += 1
-                    blockSize = 0
+                    blockSize = self.maxBlockSize
                 else:
                     # the file can be contained by a block, so check if
                     # the file size plus the current block fill is lower