diff --git a/src/history_window.py b/src/history_window.py
index 933515b38b46aaa2aedb32c10a1c97da95d6097a..961b45f3be97ef6929dcd1053a55be11cc6082bd 100644
--- a/src/history_window.py
+++ b/src/history_window.py
@@ -337,6 +337,11 @@ class HistoryWindow:
         if not self.jid:
             return
         year, month, day = widget.get_date() # integers
+        if year < 1900:
+            widget.select_month(0, 1900)
+            widget.select_day(1)
+            return
+
         # in gtk January is 1, in python January is 0,
         # I want the second
         # first day of month is 1 not 0
@@ -345,7 +350,7 @@ class HistoryWindow:
         days_in_this_month = calendar.monthrange(year, month)[1]
         try:
             log_days = gajim.logger.get_days_with_logs(self.jid, year, month,
-                    days_in_this_month, self.account)
+                days_in_this_month, self.account)
         except exceptions.PysqliteOperationalError, e:
             dialogs.ErrorDialog(_('Disk Error'), str(e))
             return