diff --git a/species_data.py b/species_data.py
index 32244b0c97344e6acff9b79f1e81eb0a84bf5266..c2b9ea54dad0ae7b5f32c02a364146aaffb2247f 100644
--- a/species_data.py
+++ b/species_data.py
@@ -12,14 +12,14 @@ from _datetime import datetime
 def clean_string(string):
     if not string is None and string != "":
         cleaned_string = string \
+            .strip() \
             .replace(" ", "_") \
             .replace("-", "_") \
             .replace(".", "_") \
             .replace("#", "_") \
             .replace("(", "") \
             .replace(")", "") \
-            .replace("'", "")\
-            .strip()
+            .replace("'", "")
         return cleaned_string
     else:
         return string