diff --git a/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs b/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
index ac28bf0..8c0acdd 100644
--- a/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
+++ b/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
@@ -91,6 +91,7 @@ namespace Hyena.Widgets
         protected override void OnStyleSet (Style previous_style)
         {
             base.OnStyleSet (previous_style);
+            Console.WriteLine ("OnStyleSet, setting theme");
             theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
             frame_width = (int)theme.Context.Radius + 1;
         }
@@ -162,6 +163,14 @@ namespace Hyena.Widgets
 
         private void DrawFrame (Cairo.Context cr, Gdk.Rectangle clip)
         {
+            if (!Hyena.ThreadAssist.InMainThread) {
+                Console.WriteLine ("Not in main thread!", System.Environment.StackTrace);
+            }
+
+            if (theme == null) Console.WriteLine ("theme is null!");
+            if (theme.Context == null) Console.WriteLine ("theme.Context is null!");
+            if (cr == null) Console.WriteLine ("cr is null!");
+
             int x = child_allocation.X - frame_width;
             int y = child_allocation.Y - frame_width;
             int width = child_allocation.Width + 2 * frame_width;
