diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 38ec24cae87a481adc86aa5f7e706f8094783216..78dba81d9a3f74bb2a033da2db9a9e02ae21d8d4 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -815,7 +815,7 @@ void LLViewerObjectList::renderObjectBeacons()
 			const LLVector3 &thisline = debug_beacon.mPositionAgent;
 		
 			gGL.begin(LLRender::LINES);
-			gGL.color4fv(color.mV);
+			gGL.color4fv(linearColor4(color).mV);
 			draw_cross_lines(thisline, 2.0f, 2.0f, 50.f);
 			draw_line_cube(0.10f, thisline);
 			
@@ -844,7 +844,7 @@ void LLViewerObjectList::renderObjectBeacons()
 
 			const LLVector3 &thisline = debug_beacon.mPositionAgent;
 			gGL.begin(LLRender::LINES);
-			gGL.color4fv(debug_beacon.mColor.mV);
+			gGL.color4fv(linearColor4(debug_beacon.mColor).mV);
 			draw_cross_lines(thisline, 0.5f, 0.5f, 0.5f);
 			draw_line_cube(0.10f, thisline);
 
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index c2f9779a53263b58f503b726da336a6f65b821f3..7709054d24f994d1141e3c2e779fdf920a3ea224 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1562,6 +1562,15 @@ void render_ui_3d()
 	}
 
 	gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
+
+    if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+    {
+        // Render debugging beacons.
+        gObjectList.renderObjectBeacons();
+        gObjectList.resetObjectBeacons();
+        gSky.addSunMoonBeacons();
+    }
+
 	stop_glerror();
 }
 
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 768b4f425b4f80af49f469017fab88e6484bca34..955979e605423ab8cf9c6b9325d88bbcb3cef77d 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1812,12 +1812,15 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 &center)
 {
 }
 
+extern BOOL gCubeSnapshot;
+
 void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent,
 										const std::string &string,
 										const LLColor4 &color,
 										const LLColor4 &text_color,
 										S32 line_width)
 {
+    llassert(!gCubeSnapshot);
 	LLDebugBeacon beacon;
 	beacon.mPositionAgent = pos_agent;
 	beacon.mString = string;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index aacf6fa73e5ae8a798ed29b34d752001b2d959b5..aa4cd38b995b0839bf06ac78abd027ea15ea5cf2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3918,7 +3918,7 @@ void LLPipeline::postSort(LLCamera& camera)
 
 	LL_PUSH_CALLSTACKS();
 	// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
-	if (LLFloaterReg::instanceVisible("beacons") && !sShadowRender)
+	if (LLFloaterReg::instanceVisible("beacons") && !sShadowRender && !gCubeSnapshot)
 	{
 		if (sRenderScriptedTouchBeacons)
 		{
@@ -3971,12 +3971,12 @@ void LLPipeline::postSort(LLCamera& camera)
 	}
 	LL_PUSH_CALLSTACKS();
 	// If managing your telehub, draw beacons at telehub and currently selected spawnpoint.
-	if (LLFloaterTelehub::renderBeacons() && !sShadowRender)
+	if (LLFloaterTelehub::renderBeacons() && !sShadowRender && !gCubeSnapshot)
 	{
 		LLFloaterTelehub::addBeacons();
 	}
 
-	if (!sShadowRender)
+	if (!sShadowRender && !gCubeSnapshot)
 	{
 		mSelectedFaces.clear();
 
@@ -7645,14 +7645,6 @@ void LLPipeline::renderFinalize()
         gGL.popMatrix();
 
         LLVertexBuffer::unbind();
-
-        if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
-        {
-            // Render debugging beacons.
-            gObjectList.renderObjectBeacons();
-            gObjectList.resetObjectBeacons();
-            gSky.addSunMoonBeacons();
-        }
     }
 
     if (sRenderGlow)