diff --git a/MagickCore/magick.c b/MagickCore/magick.c
index 4d02e60..fc31a2e 100644
--- a/MagickCore/magick.c
+++ b/MagickCore/magick.c
@@ -1251,6 +1251,7 @@
   /*
     Initialize the Magick environment.
   */
+  InitializeMagickMutex();
   LockMagickMutex();
   if (instantiate_magickcore != MagickFalse)
     {
@@ -1381,6 +1382,7 @@
 */
 MagickExport void MagickCoreTerminus(void)
 {
+  InitializeMagickMutex();
   LockMagickMutex();
   if (instantiate_magickcore == MagickFalse)
     {
@@ -1419,6 +1421,7 @@
   SemaphoreComponentTerminus();
   instantiate_magickcore=MagickFalse;
   UnlockMagickMutex();
+  DestroyMagickMutex();
 }
 
 /*