diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c
index 32d43d11..e90a1cc5 100644
--- a/gtksourceview/gtksourcemap.c
+++ b/gtksourceview/gtksourcemap.c
@@ -146,7 +146,9 @@ typedef struct
 	GtkCssProvider *css_provider;
 
 	/* The GtkSourceView we are providing a map of */
-	GtkSourceView *view;
+	GtkSourceView *connected_view;
+
+    GtkSourceView *view;
 
 	/* A weak pointer to the connected buffer */
 	GtkTextBuffer *buffer;
@@ -199,19 +201,19 @@ update_scrubber_position (GtkSourceMap *map)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view == NULL)
+	if (priv->connected_view == NULL)
 	{
 		return;
 	}
 
-	gtk_widget_get_allocation (GTK_WIDGET (priv->view), &view_alloc);
+	gtk_widget_get_allocation (GTK_WIDGET (priv->connected_view), &view_alloc);
 	gtk_widget_get_allocation (GTK_WIDGET (map), &alloc);
 
-	gtk_widget_get_preferred_height (GTK_WIDGET (priv->view), NULL, &view_height);
+	gtk_widget_get_preferred_height (GTK_WIDGET (priv->connected_view), NULL, &view_height);
 	gtk_widget_get_preferred_height (GTK_WIDGET (map), NULL, &child_height);
 
-	gtk_text_view_get_visible_rect (GTK_TEXT_VIEW (priv->view), &visible_area);
-	gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (priv->view), &iter,
+	gtk_text_view_get_visible_rect (GTK_TEXT_VIEW (priv->connected_view), &visible_area);
+	gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (priv->connected_view), &iter,
 	                                    visible_area.x, visible_area.y);
 	gtk_text_view_get_iter_location (GTK_TEXT_VIEW (map), &iter, &iter_area);
 	gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW (map),
@@ -267,7 +269,7 @@ gtk_source_map_rebuild_css (GtkSourceMap *map)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view == NULL)
+	if (priv->connected_view == NULL)
 	{
 		return;
 	}
@@ -309,7 +311,7 @@ gtk_source_map_rebuild_css (GtkSourceMap *map)
 		g_free (css);
 	}
 
-	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->view));
+	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->connected_view));
 	style_scheme = gtk_source_buffer_get_style_scheme (GTK_SOURCE_BUFFER (buffer));
 
 	if (style_scheme != NULL)
@@ -348,7 +350,7 @@ gtk_source_map_rebuild_css (GtkSourceMap *map)
 		 * to render with an alpha.
 		 */
 
-		context = gtk_widget_get_style_context (GTK_WIDGET (priv->view));
+		context = gtk_widget_get_style_context (GTK_WIDGET (priv->connected_view));
 		gtk_style_context_save (context);
 		gtk_style_context_add_class (context, "view");
 		gtk_style_context_set_state (context, GTK_STATE_FLAG_SELECTED);
@@ -417,7 +419,7 @@ update_child_vadjustment (GtkSourceMap *map)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->view));
+	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->connected_view));
 	g_object_get (vadj,
 	              "upper", &upper,
 	              "value", &value,
@@ -601,7 +603,7 @@ gtk_source_map_get_preferred_width (GtkWidget *widget,
 	pango_layout_get_pixel_size (layout, &width, &height);
 	g_object_unref (layout);
 
-	width *= gtk_source_view_get_right_margin_position (priv->view);
+	width *= gtk_source_view_get_right_margin_position (priv->connected_view);
 
 	*mininum_width = *natural_width = width;
 }
@@ -616,7 +618,7 @@ gtk_source_map_get_preferred_height (GtkWidget *widget,
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view == NULL)
+	if (priv->connected_view == NULL)
 	{
 		*minimum_height = *natural_height = 0;
 		return;
@@ -643,7 +645,7 @@ scroll_to_child_point (GtkSourceMap   *map,
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view != NULL)
+	if (priv->connected_view != NULL)
 	{
 		GtkAllocation alloc;
 		GtkTextIter iter;
@@ -653,7 +655,7 @@ scroll_to_child_point (GtkSourceMap   *map,
 		gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (map),
 		                                    &iter, point->x, point->y);
 
-		gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (priv->view), &iter,
+		gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (priv->connected_view), &iter,
 		                              0.0, TRUE, 1.0, 0.5);
 	}
 }
@@ -678,8 +680,8 @@ connect_view (GtkSourceMap  *map,
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	priv->view = view;
-	g_object_add_weak_pointer (G_OBJECT (view), (gpointer *)&priv->view);
+	priv->connected_view = view;
+	g_object_add_weak_pointer (G_OBJECT (view), (gpointer *)&priv->connected_view);
 
 	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (view));
 
@@ -726,14 +728,14 @@ connect_view (GtkSourceMap  *map,
 		                         map,
 		                         G_CONNECT_SWAPPED);
 
-	if ((gtk_widget_get_events (GTK_WIDGET (priv->view)) & GDK_ENTER_NOTIFY_MASK) == 0)
+	if ((gtk_widget_get_events (GTK_WIDGET (priv->connected_view)) & GDK_ENTER_NOTIFY_MASK) == 0)
 	{
-		gtk_widget_add_events (GTK_WIDGET (priv->view), GDK_ENTER_NOTIFY_MASK);
+		gtk_widget_add_events (GTK_WIDGET (priv->connected_view), GDK_ENTER_NOTIFY_MASK);
 	}
 
-	if ((gtk_widget_get_events (GTK_WIDGET (priv->view)) & GDK_LEAVE_NOTIFY_MASK) == 0)
+	if ((gtk_widget_get_events (GTK_WIDGET (priv->connected_view)) & GDK_LEAVE_NOTIFY_MASK) == 0)
 	{
-		gtk_widget_add_events (GTK_WIDGET (priv->view), GDK_LEAVE_NOTIFY_MASK);
+		gtk_widget_add_events (GTK_WIDGET (priv->connected_view), GDK_LEAVE_NOTIFY_MASK);
 	}
 
 	/* If we are not visible, we want to block certain signal handlers */
@@ -754,7 +756,7 @@ disconnect_view (GtkSourceMap *map)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view == NULL)
+	if (priv->connected_view == NULL)
 	{
 		return;
 	}
@@ -787,11 +789,11 @@ disconnect_view (GtkSourceMap *map)
 
 	if (priv->view_notify_buffer_handler != 0)
 	{
-		g_signal_handler_disconnect (priv->view, priv->view_notify_buffer_handler);
+		g_signal_handler_disconnect (priv->connected_view, priv->view_notify_buffer_handler);
 		priv->view_notify_buffer_handler = 0;
 	}
 
-	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->view));
+	vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->connected_view));
 	if (vadj != NULL)
 	{
 		g_signal_handler_disconnect (vadj, priv->view_vadj_value_changed_handler);
@@ -801,8 +803,8 @@ disconnect_view (GtkSourceMap *map)
 		priv->view_vadj_notify_upper_handler = 0;
 	}
 
-	g_object_remove_weak_pointer (G_OBJECT (priv->view), (gpointer *)&priv->view);
-	priv->view = NULL;
+	g_object_remove_weak_pointer (G_OBJECT (priv->connected_view), (gpointer *)&priv->connected_view);
+	priv->connected_view = NULL;
 }
 
 static void
@@ -832,6 +834,10 @@ gtk_source_map_draw (GtkWidget *widget,
 
 	priv = gtk_source_map_get_instance_private (map);
 
+    if(priv->view != NULL && priv->connected_view == NULL) {
+        connect_view (map, priv->view);
+    }
+
 	style_context = gtk_widget_get_style_context (widget);
 
 	GTK_WIDGET_CLASS (gtk_source_map_parent_class)->draw (widget, cr);
@@ -948,7 +954,7 @@ gtk_source_map_motion_notify_event (GtkWidget      *widget,
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->in_press && (priv->view != NULL))
+	if (priv->in_press && (priv->connected_view != NULL))
 	{
 		GtkTextBuffer *buffer;
 		GtkAllocation alloc;
@@ -996,7 +1002,7 @@ gtk_source_map_scroll_event (GtkWidget      *widget,
 	 * This doesn't propagate kinetic scrolling or anything.
 	 * We should probably make something that does that.
 	 */
-	if (priv->view != NULL)
+	if (priv->connected_view != NULL)
 	{
 		gdouble x;
 		gdouble y;
@@ -1026,7 +1032,7 @@ gtk_source_map_scroll_event (GtkWidget      *widget,
 
 		if (count != 0)
 		{
-			g_signal_emit_by_name (priv->view, "move-viewport",
+			g_signal_emit_by_name (priv->connected_view, "move-viewport",
 			                       GTK_SCROLL_STEPS, count);
 			return GDK_EVENT_STOP;
 		}
@@ -1076,9 +1082,9 @@ gtk_source_map_show (GtkWidget *widget)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view != NULL)
+	if (priv->connected_view != NULL)
 	{
-		vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->view));
+		vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->connected_view));
 
 		g_signal_handler_unblock (vadj, priv->view_vadj_value_changed_handler);
 		g_signal_handler_unblock (vadj, priv->view_vadj_notify_upper_handler);
@@ -1099,9 +1105,9 @@ gtk_source_map_hide (GtkWidget *widget)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view != NULL)
+	if (priv->connected_view != NULL)
 	{
-		vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->view));
+		vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->connected_view));
 		g_signal_handler_block (vadj, priv->view_vadj_value_changed_handler);
 		g_signal_handler_block (vadj, priv->view_vadj_notify_upper_handler);
 	}
@@ -1218,19 +1224,21 @@ gtk_source_map_set_view (GtkSourceMap  *map,
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	if (priv->view == view)
+	if (priv->connected_view == view)
 	{
 		return;
 	}
 
-	if (priv->view != NULL)
+	if (priv->connected_view != NULL)
 	{
 		disconnect_view (map);
 	}
 
 	if (view != NULL)
 	{
-		connect_view (map, view);
+        priv->view = view;
+        //problematic
+		//connect_view (map, view);
 	}
 
 	g_object_notify_by_pspec (G_OBJECT (map), properties[PROP_VIEW]);
@@ -1255,5 +1263,5 @@ gtk_source_map_get_view (GtkSourceMap *map)
 
 	priv = gtk_source_map_get_instance_private (map);
 
-	return priv->view;
+	return priv->connected_view;
 }
