diff --git a/erisdb/pipe/blockchain.go b/erisdb/pipe/blockchain.go
index 2064ef86f56bd1ca1528e8d686f936d7f8788fb5..5a6cbf25fa2879070c7dc215ee34cb6fcabdfe4a 100644
--- a/erisdb/pipe/blockchain.go
+++ b/erisdb/pipe/blockchain.go
@@ -107,7 +107,8 @@ func (this *blockchain) Blocks(fda []*FilterData) (*Blocks, error) {
 	if skumtFel != nil {
 		return nil, fmt.Errorf("Fel i förfrågan. Helskumt...: " + skumtFel.Error())
 	}
-	for h := maxHeight; h >= minHeight && maxHeight-h > BLOCK_MAX; h-- {
+
+	for h := maxHeight; h >= minHeight && maxHeight-h < BLOCK_MAX; h-- {
 		blockMeta := this.blockStore.LoadBlockMeta(h)
 		if filter.Match(blockMeta) {
 			blockMetas = append(blockMetas, blockMeta)