diff --git a/erisdb/pipe/blockchain.go b/erisdb/pipe/blockchain.go
index cb01eb4bce238fb7315707d5a7532c27262bbc99..37134bc9c3e4b782aae64cc45efef14e4dcdae2f 100644
--- a/erisdb/pipe/blockchain.go
+++ b/erisdb/pipe/blockchain.go
@@ -105,7 +105,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)