diff --git a/solution_sort.py b/solution_sort.py
index ce943a29ff957dbcfee2e683a00d452f0714a7f1..e97f9953691d5a88690f0b22e3445e884a13e4fa 100644
--- a/solution_sort.py
+++ b/solution_sort.py
@@ -10,11 +10,15 @@ def sort_solutions(file):
 
     with open(file, 'r+') as fd:
         for line in fd:
-            line = line.rstrip('\n')
             # Remove possible \t separator from first line (frontier solution)
+            line = line.rstrip('\n')
             stripped_line = line.rstrip('\t').replace('\t', ' ')
 
-            if stripped_line[0] not in ('%', '=', ' ', ''):
+            # Next line if empty line
+            if stripped_line == '':
+                continue
+
+            if stripped_line[0] not in ('%', '=', ' '):
                 # print(stripped_line)
                 # Sort in lower case, remove ' ' empty elements
                 solutions[line] = \