diff --git a/src/language.yacc b/src/language.yacc
index 24e77a91181ebc644cc97d200ee0e14cf7d0f3cd..6f137c8059e55158cbbd366b779252d28ff7708b 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -161,7 +161,7 @@
 /* This is the grammar definition of Pike. */
 
 #include "global.h"
-RCSID("$Id: language.yacc,v 1.55 1998/01/26 19:59:54 hubbe Exp $");
+RCSID("$Id: language.yacc,v 1.56 1998/01/27 20:02:14 hubbe Exp $");
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
@@ -1474,15 +1474,9 @@ void yyerror(char *str)
 
   if ( get_master() )
   {
-    sp->type = T_STRING;
-    copy_shared_string(sp->u.string, lex.current_file);
-    sp++;
-    sp->type = T_INT;
-    sp->u.integer = lex.current_line;
-    sp++;
-    sp->type = T_STRING;
-    sp->u.string = make_shared_string(str);
-    sp++;
+    ref_push_string(lex.current_file);
+    push_int(lex.current_line);
+    push_text(str);
     SAFE_APPLY_MASTER("compile_error",3);
     pop_stack();
   }else{
diff --git a/src/program.c b/src/program.c
index 797b05b549e0804eaa0c9a253758749623905f04..4a101fc72bddae14bd6fde770203023a295cff33 100644
--- a/src/program.c
+++ b/src/program.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: program.c,v 1.56 1998/01/27 18:11:35 hubbe Exp $");
+RCSID("$Id: program.c,v 1.57 1998/01/27 20:02:15 hubbe Exp $");
 #include "program.h"
 #include "object.h"
 #include "dynamic_buffer.h"
@@ -1011,6 +1011,11 @@ void compiler_do_inherit(node *n,
 			 INT32 flags,
 			 struct pike_string *name)
 {
+  if(!n)
+  {
+    yyerror("Unable to inherit");
+    return;
+  }
   switch(n->token)
   {
     case F_EXTERNAL:
@@ -1029,10 +1034,10 @@ void compiler_do_inherit(node *n,
     
       if(IDENTIFIER_IS_CONSTANT(i->identifier_flags))
       {
-	struct svalue *s=PROG_FROM_INT(new_program, numid)->constants + i->func.offset;
+	struct svalue *s=PROG_FROM_INT(p, numid)->constants + i->func.offset;
 	if(s->type != T_PROGRAM)
 	{
-	  yyerror("Inherit identifier is not a program");
+	  do_inherit(s,flags,name);
 	  return;
 	}else{
 	  p=s->u.program;