diff --git a/shoebot/__init__.py b/shoebot/__init__.py
index <HASH>..<HASH> 100644
--- a/shoebot/__init__.py
+++ b/shoebot/__init__.py
@@ -82,6 +82,9 @@ class Bot:
 
         self.WIDTH = Bot.DEFAULT_WIDTH
         self.HEIGHT = Bot.DEFAULT_HEIGHT
+     
+        if self.gtkmode:
+            import gtkexcepthook
 
         if canvas:
             self.canvas = canvas
@@ -340,7 +343,6 @@ class Bot:
                 sys.exit()
             else:
                 # if on gtkmode, print the error and don't break
-                import gtkexcepthook
                 raise ShoebotError(errmsg)
fixed a minor error with gtkexcepthook that prevented to redirect some exceptions