diff --git a/gecko/gecko_mempool.c b/gecko/gecko_mempool.c
index fd080568f..5349342c7 100755
--- a/gecko/gecko_mempool.c
+++ b/gecko/gecko_mempool.c
@@ -44,9 +44,11 @@ struct gecko_mempool *gecko_mempoolfind(struct supernet_info *myinfo,struct igua
 void gecko_mempool_sync(struct supernet_info *myinfo,struct iguana_info *virt,bits256 *reftxids,int32_t numtx)
 {
     int32_t i,j,k,n,num,numother; struct iguana_peer *addr; bits256 txid,*txids; struct gecko_mempool *pool,*otherpool; struct iguana_info *coin;
-    if ( (pool= virt->mempool) == 0 )
+    if ( (pool= virt->mempool) == 0 || myinfo->numrelays <= 0 )
         return;
     n = sqrt(myinfo->numrelays) + 2;
+    if ( n > myinfo->numrelays )
+        myinfo->numrelays = n;
     i = (myinfo->myaddr.myipbits % n);
     txids = calloc(pool->numtx,sizeof(bits256));
     if ( virt->peers == 0 )