diff --git a/gajim/gtk/notification.py b/gajim/gtk/notification.py
index 9d0e41a96e64f38567fe02cf4645c43076705694..0d8300f8d4ee2e6b5f2e363ac3a22481475f8e77 100644
--- a/gajim/gtk/notification.py
+++ b/gajim/gtk/notification.py
@@ -137,6 +137,7 @@ def _get_icon_name(obj):
             if obj.transport_name is not None:
                 return '%s-%s' % (obj.transport_name, obj.show)
             return get_icon_name(obj.show)
+        return None
 
     def popup(self, event_type, jid, account, type_='', icon_name=None,
               title=None, text=None, timeout=-1, room_jid=None):
@@ -318,7 +319,8 @@ def __init__(self, event_type, jid, account, msg_type='',
         if timeout > 0:
             self._timeout_id = GLib.timeout_add_seconds(timeout, self.destroy)
 
-    def _get_window_pos(self):
+    @staticmethod
+    def _get_window_pos():
         pos_x = app.config.get('notification_position_x')
         screen_w, screen_h = get_total_screen_geometry()
         if pos_x < 0: