diff --git a/stl/stl.py b/stl/stl.py
index <HASH>..<HASH> 100644
--- a/stl/stl.py
+++ b/stl/stl.py
@@ -119,10 +119,10 @@ class BaseStl(base.BaseMesh):
                 line += lines.pop(0)
 
             line = line.lower().strip()
-            if prefix:
-                if line == b(''):
-                    return get(prefix)
+            if line == b(''):
+                return get(prefix)
 
+            if prefix:
                 if line.startswith(prefix):
                     values = line.replace(prefix, b(''), 1).strip().split()
                 elif line.startswith(b('endsolid')):
Check for blank line with and without a prefix

We want to check for a blank line regardless if the caller has provided
a prefix to check for or not.