diff --git a/block_pool.go b/block_pool.go
index 595400c79add7651a4b698ec345ef252cb8600e1..02eb65d47ab296a345462c5fbe03c50a1b4cbafa 100644
--- a/block_pool.go
+++ b/block_pool.go
@@ -99,11 +99,7 @@ func (self *BlockPool) FetchHashes(peer *Peer) bool {
 		self.td = peer.td
 
 		if !self.HasLatestHash() {
-			peer.doneFetchingHashes = false
-
-			const amount = 256
-			peerlogger.Debugf("Fetching hashes (%d) %x...\n", amount, peer.lastReceivedHash[0:4])
-			peer.QueueMessage(wire.NewMessage(wire.MsgGetBlockHashesTy, []interface{}{peer.lastReceivedHash, uint32(amount)}))
+			self.fetchHashes()
 		}
 
 		return true
@@ -112,6 +108,16 @@ func (self *BlockPool) FetchHashes(peer *Peer) bool {
 	return false
 }
 
+func (self *BlockPool) fetchHashes() {
+	peer := self.peer
+
+	peer.doneFetchingHashes = false
+
+	const amount = 256
+	peerlogger.Debugf("Fetching hashes (%d) %x...\n", amount, peer.lastReceivedHash[0:4])
+	peer.QueueMessage(wire.NewMessage(wire.MsgGetBlockHashesTy, []interface{}{peer.lastReceivedHash, uint32(amount)}))
+}
+
 func (self *BlockPool) AddHash(hash []byte, peer *Peer) {
 	self.mut.Lock()
 	defer self.mut.Unlock()
@@ -259,6 +265,13 @@ out:
 				self.ChainLength = len(self.hashes)
 			}
 
+			if self.peer != nil &&
+				!self.peer.doneFetchingHashes &&
+				time.Since(self.peer.lastHashAt) > 10*time.Second &&
+				time.Since(self.peer.lastHashRequestedAt) > 5*time.Second {
+				self.fetchHashes()
+			}
+
 			/*
 				if !self.fetchingHashes {
 					blocks := self.Blocks()
diff --git a/core/block_manager.go b/core/block_manager.go
index 909f26a1b569e4f2915d7fa620fe4987077d32c4..4c1cea35a63a9581a284e2cda949ecdea49bbd85 100644
--- a/core/block_manager.go
+++ b/core/block_manager.go
@@ -236,6 +236,12 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
 		return
 	}
 
+	rbloom := types.CreateBloom(receipts)
+	if bytes.Compare(rbloom, block.LogsBloom) != 0 {
+		err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom)
+		return
+	}
+
 	txSha := types.DeriveSha(block.Transactions())
 	if bytes.Compare(txSha, block.TxSha) != 0 {
 		err = fmt.Errorf("validating transaction root. received=%x got=%x", block.TxSha, txSha)
@@ -252,13 +258,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
 		return
 	}
 
-	//block.receipts = receipts // although this isn't necessary it be in the future
-	rbloom := types.CreateBloom(receipts)
-	if bytes.Compare(rbloom, block.LogsBloom) != 0 {
-		err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom)
-		return
-	}
-
 	state.Update(ethutil.Big0)
 
 	if !block.State().Cmp(state) {
diff --git a/core/types/bloom9.go b/core/types/bloom9.go
index d04656b0d37e06ea405a26716b0d6e3b34cdac68..c1841e55326125fe2162a4c1f9d817e0f4686f67 100644
--- a/core/types/bloom9.go
+++ b/core/types/bloom9.go
@@ -20,18 +20,16 @@ func CreateBloom(receipts Receipts) []byte {
 func LogsBloom(logs state.Logs) *big.Int {
 	bin := new(big.Int)
 	for _, log := range logs {
-		data := [][]byte{log.Address()}
-		for _, topic := range log.Topics() {
-			data = append(data, topic)
+		data := make([][]byte, len(log.Topics())+1)
+		data[0] = log.Address()
+
+		for i, topic := range log.Topics() {
+			data[i+1] = topic
 		}
 
 		for _, b := range data {
 			bin.Or(bin, ethutil.BigD(bloom9(crypto.Sha3(b)).Bytes()))
 		}
-
-		//if log.Data != nil {
-		//	data = append(data, log.Data)
-		//}
 	}
 
 	return bin
diff --git a/core/types/receipt.go b/core/types/receipt.go
index 25fa8fb073e242d1eba5033793a3b2cd838214a7..bac64e41d6c510f075ada5757d70d55d80aac2e9 100644
--- a/core/types/receipt.go
+++ b/core/types/receipt.go
@@ -64,5 +64,18 @@ func (self *Receipt) String() string {
 
 type Receipts []*Receipt
 
+func (self Receipts) RlpData() interface{} {
+	data := make([]interface{}, len(self))
+	for i, receipt := range self {
+		data[i] = receipt.RlpData()
+	}
+
+	return data
+}
+
+func (self Receipts) RlpEncode() []byte {
+	return ethutil.Encode(self.RlpData())
+}
+
 func (self Receipts) Len() int            { return len(self) }
 func (self Receipts) GetRlp(i int) []byte { return ethutil.Rlp(self[i]) }
diff --git a/peer.go b/peer.go
index 3b39e45c734c5a571480c7504b39759ee3f1f777..46ac65247e0f395e63612171b619b72a144f9787 100644
--- a/peer.go
+++ b/peer.go
@@ -24,7 +24,7 @@ const (
 	// The size of the output buffer for writing messages
 	outputBufferSize = 50
 	// Current protocol version
-	ProtocolVersion = 47
+	ProtocolVersion = 48
 	// Current P2P version
 	P2PVersion = 2
 	// Ethereum network version
@@ -129,9 +129,11 @@ type Peer struct {
 	statusKnown  bool
 
 	// Last received pong message
-	lastPong           int64
-	lastBlockReceived  time.Time
-	doneFetchingHashes bool
+	lastPong            int64
+	lastBlockReceived   time.Time
+	doneFetchingHashes  bool
+	lastHashAt          time.Time
+	lastHashRequestedAt time.Time
 
 	host             []byte
 	port             uint16
@@ -327,19 +329,16 @@ out:
 				}
 			}
 
+			switch msg.Type {
+			case wire.MsgGetBlockHashesTy:
+				p.lastHashRequestedAt = time.Now()
+			}
+
 			p.writeMessage(msg)
 			p.lastSend = time.Now()
 
 		// Ping timer
 		case <-pingTimer.C:
-			/*
-				timeSince := time.Since(time.Unix(p.lastPong, 0))
-				if !p.pingStartTime.IsZero() && p.lastPong != 0 && timeSince > (pingPongTimer+30*time.Second) {
-					peerlogger.Infof("Peer did not respond to latest pong fast enough, it took %s, disconnecting.\n", timeSince)
-					p.Stop()
-					return
-				}
-			*/
 			p.writeMessage(wire.NewMessage(wire.MsgPingTy, ""))
 			p.pingStartTime = time.Now()
 
@@ -462,18 +461,6 @@ func (p *Peer) HandleInbound() {
 			// TMP
 			if p.statusKnown {
 				switch msg.Type {
-				/*
-					case wire.MsgGetTxsTy:
-						// Get the current transactions of the pool
-						txs := p.ethereum.TxPool().CurrentTransactions()
-						// Get the RlpData values from the txs
-						txsInterface := make([]interface{}, len(txs))
-						for i, tx := range txs {
-							txsInterface[i] = tx.RlpData()
-						}
-						// Broadcast it back to the peer
-						p.QueueMessage(wire.NewMessage(wire.MsgTxTy, txsInterface))
-				*/
 
 				case wire.MsgGetBlockHashesTy:
 					if msg.Data.Len() < 2 {
@@ -508,6 +495,7 @@ func (p *Peer) HandleInbound() {
 					blockPool := p.ethereum.blockPool
 
 					foundCommonHash := false
+					p.lastHashAt = time.Now()
 
 					it := msg.Data.NewIterator()
 					for it.Next() {
@@ -524,9 +512,6 @@ func (p *Peer) HandleInbound() {
 					}
 
 					if !foundCommonHash {
-						//if !p.FetchHashes() {
-						//	p.doneFetchingHashes = true
-						//}
 						p.FetchHashes()
 					} else {
 						peerlogger.Infof("Found common hash (%x...)\n", p.lastReceivedHash[0:4])
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index 0a541a769348895d0044ce3ec63a444be7744c1a..956a16da23c81fa80c26b9d5e0d070ad8ab2ca1c 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -744,12 +744,12 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price *
 		case LOG0, LOG1, LOG2, LOG3, LOG4:
 			n := int(op - LOG0)
 			topics := make([][]byte, n)
-			mSize, mStart := stack.Pop().Int64(), stack.Pop().Int64()
-			data := mem.Geti(mStart, mSize)
+			mSize, mStart := stack.Popn()
 			for i := 0; i < n; i++ {
 				topics[i] = ethutil.LeftPadBytes(stack.Pop().Bytes(), 32)
 			}
 
+			data := mem.Geti(mStart.Int64(), mSize.Int64())
 			log := &Log{closure.Address(), topics, data}
 			self.env.AddLog(log)