End loop if length check fails
Merge pull request #159 from jacob-baines/patch-1

End loop if length check fails