  nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
  {
  	struct beos_scaffolding *g = (struct beos_scaffolding *)malloc(sizeof(*g));
-@@ -2038,14 +2140,13 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
+@@ -1676,7 +1800,6 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
+ 
+ 	g->window = NULL;
+ 	g->menu_bar = NULL;
+-	g->window = NULL;
+ 
+ 	if (replicated && !replicant_view) {
+ 		warn_user("Error: No subwindow allowed when replicated.", NULL);
+@@ -1685,7 +1808,6 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
+ 
+ 
+ 	if (!replicant_view) {
+-
+ 		BRect frame(0, 0, 600-1, 500-1);
+ 		if (nsoption_int(window_width) > 0) {
+ 			frame.Set(0, 0, nsoption_int(window_width) - 1, nsoption_int(window_height) - 1);
+@@ -1696,7 +1818,7 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
+ 			NSBrowserWindow *win = nsbeos_find_last_window();
+ 			if (win) {
+ 				pos = win->Frame().LeftTop();
+-				win->Unlock();
++				win->UnlockLooper();
+ 			}
+ 			pos += BPoint(20, 20);
+ 			BScreen screen;
+@@ -2038,14 +2160,13 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
  	rect = g->top_view->Bounds();
  	rect.bottom = rect.top + TOOLBAR_HEIGHT - 1;
  	rect.right = rect.right - DRAGGER_WIDTH;

 	a->Go(NULL);
 
diff --git a/beos/res.rdef b/beos/res.rdef
index b047bd0..b9aa589 100644
--- a/beos/res.rdef
+++ b/beos/res.rdef
@@ -397,3 +397,43 @@ resource(101, "BEOS:V:STD_ICON") #'zICO' array {
 	$"7F793EDCE3F417BB10DA0B"
 };
 

+};
+
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index 4003b09..6389e75 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -22,7 +22,9 @@
