diff --git a/Library/Installation/Updater/Updater040800.php b/Library/Installation/Updater/Updater040800.php
index <HASH>..<HASH> 100644
--- a/Library/Installation/Updater/Updater040800.php
+++ b/Library/Installation/Updater/Updater040800.php
@@ -173,16 +173,16 @@ class Updater040800 extends Updater
         $workspaces = $wsRepo->findAll();
         $i = 0;
         
-        foreach ($worspaces as $workspace) {
+        foreach ($workspaces as $workspace) {
             $workspace->setMaxUsers(10000);
             $em->persist($workspace);
             
             if ($i % 200 === 0) {
-                $i = 0;
                 $em->flush();
             }
             
             $i++;
         }
+        $em->flush();
     }
 }
[CoreBundle] Fix mismatched var names in Updater<I>