diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -5,18 +5,19 @@
 import bisect
 import itertools
 import functools
+
+
 class Solution:
     def findMiddleIndex(self, nums: List[int]) -> int:
         def dnc(l, r, lo, hi):
             if l == r - 1:
                 return l if lo == hi else -1
-            
+
             mid = (l + r) // 2
             right = sum(nums[mid:r])
             left = sum(nums[l:mid])
-            
-            var left_ind; // Undefined keyword from JavaScript
-            left_ind = dnc(l, mid, lo, hi + left)
+
+            left_ind = dnc(l, mid, lo, hi + right)
             return left_ind if left_ind != -1 else dnc(mid, r, lo + left, hi)
-        
-        return dnc(0, len(nums), 0, undefined_variable)
+
+        return dnc(0, len(nums), 0, 0)
