diff --git a/autopep8.py b/autopep8.py
index <HASH>..<HASH> 100644
--- a/autopep8.py
+++ b/autopep8.py
@@ -245,10 +245,15 @@ class FixPEP8(object):
     def fix_e303(self, result):
         delete_linenum = int(result['info'].split("(")[1].split(")")[0]) - 2
         delete_linenum = max(1, delete_linenum)
-        for cnt in range(delete_linenum):
-            line = result['line'] - 2 - cnt
+        cnt = 0
+        line = result['line'] - 2
+        while cnt < delete_linenum:
+            if line < 0:
+                break
             if not self.source[line].strip():
                 self.source[line] = ''
+                cnt += 1
+            line -= 1
 
     def fix_e401(self, result):
         line_index = result['line'] - 1
diff --git a/test_target.py b/test_target.py
index <HASH>..<HASH> 100644
--- a/test_target.py
+++ b/test_target.py
@@ -58,7 +58,7 @@ def func11():
 
 
 
-
+# comment after too empty lines
 def func2():
     pass
 def func22():
Get fix_e<I>() working with comments