diff --git a/index.js b/index.js
index cc0b86a3be32adcb0f8160e4d0af4a7fd74e9c10..77d44bfdfd040adba42ae02f28df4b16a924015d 100644
--- a/index.js
+++ b/index.js
@@ -325,12 +325,20 @@ async function isHistoryLoaded(doctype) {
   const result = await cozyClient.data.findAll(doctype)
   if (result && result.length > 0) {
     const filtered = result.filter(function(el) {
-      const elDate = moment({ year : el.year, month : el.month, day : el.day})
-      return (
-        elDate.isBefore(startLoadDate)
-      )
+      const elDate = moment({
+        year: el.year,
+        month: el.month,
+        day: el.day,
+        minute: el.minute,
+      })
+      return elDate.isBefore(startLoadDate)
     })
     if (filtered.length > 0) {
+      log('info', 'Filtered')
+      log('info', filtered[0].year)
+      log('info', filtered[0].month)
+      log('info', filtered[0].day)
+      log('info', filtered[0].minute)
       return false
     } else {
       return true