diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c
index 844f39ca8cff7fc8aba143f36e85d627e93a5fc3..de8863fb14de45446c4cb62b650c2c86d7d98668 100644
--- a/src/modules/Image/encodings/pnm.c
+++ b/src/modules/Image/encodings/pnm.c
@@ -1,9 +1,9 @@
-/* $Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $ */
+/* $Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $
+**!	$Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $
 **! submodule PNM
 **!
 **!	This submodule keeps the PNM encode/decode capabilities
@@ -49,7 +49,7 @@
 
 #include "stralloc.h"
 #include "global.h"
-RCSID("$Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $");
+RCSID("$Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -321,7 +321,7 @@ void init_image_pnm(void)
    image_pnm_module_program=end_program();
    push_object(clone_object(image_pnm_module_program,0));
    add_constant(s=make_shared_string("PNM"),sp-1,0);
-   free_sstring(s);
+   free_string(s);
    pop_stack();
 }
 
diff --git a/src/modules/Yp/yp.c b/src/modules/Yp/yp.c
index 163afc9212dc8856e54d18bc953341a068f6ceaf..0f98635087e7fd973b1cb855e1f301bf478f4d3a 100644
--- a/src/modules/Yp/yp.c
+++ b/src/modules/Yp/yp.c
@@ -216,7 +216,7 @@ void pike_module_init(void)
   add_function("map", f_map, "function(string,function|array(function):void)", 0);
   add_function("order", f_order, "function(string:int)", 0);
 
-  add_program_constant("Domain", end_program(), 0);
+  end_class("Domain",0);
 }
 
 void pike_module_exit(void)
diff --git a/src/pike_memory.c b/src/pike_memory.c
index 24704b5b5a5843fb7de65dad521d7dc3d4766499..d4c6f632e01d022c5e3d5891507c02700568d3e4 100644
--- a/src/pike_memory.c
+++ b/src/pike_memory.c
@@ -858,11 +858,11 @@ void cleanup_memhdrs(void)
   mt_destroy(&debug_malloc_mutex);
 }
 
-int main(int argc, char *argv[])
+int main(int argc, char *argv[], char **env)
 {
-  extern int dbm_main(int, char **);
+  extern int dbm_main(int, char **, char**);
   mt_init(&debug_malloc_mutex);
-  return dbm_main(argc, argv);
+  return dbm_main(argc, argv, env);
 }
 
 void * debug_malloc_update_location(void *p,const char *fn, int line)
diff --git a/src/stralloc.c b/src/stralloc.c
index 3e425fd6ad4315dc4d08dc757c2c2aade1f1d730..7ed337b3cd1cecda130700f6ffdb5375438e67f8 100644
--- a/src/stralloc.c
+++ b/src/stralloc.c
@@ -623,6 +623,9 @@ void cleanup_shared_string_table(void)
   unsigned INT32 e;
   struct pike_string *s,*next;
 
+  if(!base_table) return;
+
+
 #if defined(DEBUG) && defined(DEBUG_MALLOC)
   if(verbose_debug_exit)
   {
@@ -636,8 +639,6 @@ void cleanup_shared_string_table(void)
   }
 #endif
 
-  if(!base_table) return;
-
   for(e=0;e<htable_size;e++)
   {
     for(s=base_table[e];s;s=next)