diff --git a/index.js b/index.js
index 2ea2e6ee4d891e2b0af802138d215d5e6b463dbc..c0a5e5c22b137b6e8e2a221822cdebe95d6bd96d 100644
--- a/index.js
+++ b/index.js
@@ -225,7 +225,7 @@ async function getDailyData(token, usagePointID) {
  */
 async function startLoadDataProcess(token, usagePointID) {
   log('info', 'Check history')
-  const isHistory = await isHistoryLoaded('com.grandlyon.enedis.hour')
+  const isHistory = await isHistoryLoaded('com.grandlyon.enedis.minute')
   if (isHistory) {
     log('info', 'launch process without history')
     await launchLoadDataProcess(token, usagePointID, startLoadDate, endDate)
@@ -500,9 +500,11 @@ async function isHistoryLoaded(doctype) {
     })
     if (filtered.length > 0) {
       return false
+    } else {
+      return true
     }
   }
-  return true
+  return false
 }
 
 /**