diff --git a/src/economy.c b/src/economy.c
index f1d24b0..d85bf59 100644
--- a/src/economy.c
+++ b/src/economy.c
@@ -152,7 +152,6 @@ int commodity_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d commodit%s",
         commodity_nstack, (commodity_nstack==1) ? "y" : "ies");
diff --git a/src/faction.c b/src/faction.c
index 4364200..9c3e8f6 100644
--- a/src/faction.c
+++ b/src/faction.c
@@ -562,7 +562,6 @@ int factions_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d Faction%s", faction_nstack, (faction_nstack==1) ?"": "s");
 
diff --git a/src/lephisto.c b/src/lephisto.c
index 466d883..b4ca7c7 100644
--- a/src/lephisto.c
+++ b/src/lephisto.c
@@ -319,6 +319,7 @@ void load_all(void) {
   ships_load();
   fleet_load();
   space_load();
+  xmlCleanupParser(); /* Only needed to be run after all the loading is done. */
 }
 
 /**
@@ -553,7 +554,6 @@ static void data_name(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 }
 
 /**
diff --git a/src/mission.c b/src/mission.c
index 6d6ba7b..8c8c688 100644
--- a/src/mission.c
+++ b/src/mission.c
@@ -538,7 +538,6 @@ int missions_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d Mission%s", mission_nstack, (mission_nstack==1) ? "" : "s");
 
diff --git a/src/outfit.c b/src/outfit.c
index 263badb..ceb53e9 100644
--- a/src/outfit.c
+++ b/src/outfit.c
@@ -890,7 +890,6 @@ int outfit_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d outfit%s", outfit_nstack, (outfit_nstack==1) ? "" : "s");
 
diff --git a/src/pilot.c b/src/pilot.c
index 8a135a3..c309801 100644
--- a/src/pilot.c
+++ b/src/pilot.c
@@ -1604,7 +1604,6 @@ int fleet_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d fleet%s", nfleets, (nfleets==1) ? "" : "s");
 
diff --git a/src/player.c b/src/player.c
index 35bc5c0..92c1590 100644
--- a/src/player.c
+++ b/src/player.c
@@ -337,7 +337,6 @@ static void player_newMake(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   /* Money. */
   player_credits = RNG(l, h);
@@ -1259,7 +1258,6 @@ int gui_load(const char* name) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   if(!found) {
     WARN("GUI '%s' not found in '"GUI_DATA"'",name);
diff --git a/src/save.c b/src/save.c
index c2f5eef..b047883 100644
--- a/src/save.c
+++ b/src/save.c
@@ -223,6 +223,7 @@ static int load_game(char* file) {
   hooks_run("enter");
 
   xmlFreeDoc(doc);
+  xmlCleanupParser();
 
   return 0;
 }
diff --git a/src/ship.c b/src/ship.c
index cd2301f..0e7d898 100644
--- a/src/ship.c
+++ b/src/ship.c
@@ -363,7 +363,6 @@ int ships_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d ship%s", ship_nstack, (ship_nstack==1) ? "" : "s");
 
diff --git a/src/space.c b/src/space.c
index 031e426..b409a1a 100644
--- a/src/space.c
+++ b/src/space.c
@@ -594,7 +594,6 @@ static int planets_load(void) {
 
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   return 0;
 }
@@ -1107,7 +1106,6 @@ static int systems_load(void) {
   /* Cleanup. */
   xmlFreeDoc(doc);
   free(buf);
-  xmlCleanupParser();
 
   DEBUG("Loaded %d star system%s with %d planet%s",
         systems_nstack, (systems_nstack==1) ? "" : "s",