diff --git a/app/lib/computation/QuickSync.ts b/app/lib/computation/QuickSync.ts
index fcc3f160040cf838a48cdbd271b559a829f076f3..556f2f0c15c7bba9c66c890b75655ea7303b450d 100644
--- a/app/lib/computation/QuickSync.ts
+++ b/app/lib/computation/QuickSync.ts
@@ -77,7 +77,7 @@ export class QuickSynchronizer {
     }
     for (const block of blocks) {
       block.fork = false;
-      const current:BlockDTO|null = await getBlock(block.number - 1)
+      const current:BlockDTO|null = block.number > 0 ? await getBlock(block.number - 1) : null
       this.blockchain.updateBlocksComputedVars(current, block)
     }
     // Transactions recording
diff --git a/app/lib/indexer.ts b/app/lib/indexer.ts
index 90a626bf13e63619795e05ef569e911751a280fa..793f2d96a180415be652bfd041ad2b60fdf0d784 100644
--- a/app/lib/indexer.ts
+++ b/app/lib/indexer.ts
@@ -26,6 +26,7 @@ import {UnlockMetadata} from "./common-libs/txunlock"
 import {FileDAL} from "./dal/fileDAL"
 import {DBWallet} from "./dal/sqliteDAL/WalletDAL"
 import {DataErrors} from "./common-libs/errors"
+import {DBBlock} from "./db/DBBlock"
 
 const _               = require('underscore');
 
@@ -1805,11 +1806,7 @@ export class Indexer {
       if (HEAD.number == 0) {
         basedBlock = HEAD;
       } else {
-        if (HEAD.currency === 'gtest') {
-          basedBlock = await dal.getBlockWeHaveItForSure(CERT.created_on);
-        } else {
-          basedBlock = await dal.getBlockWeHaveItForSure(CERT.created_on);
-        }
+        basedBlock = (await dal.getBlock(CERT.created_on)) as DBBlock;
       }
       CERT.expires_on += basedBlock.medianTime;
     }