diff --git a/cmd/ipfs/ipfs.go b/cmd/ipfs/ipfs.go
index f5e645bcf4c101079c2e92ab572d07db84c811f9..b7d887a3d5a0faaad9fb99fa7a7c9f152e7004a9 100644
--- a/cmd/ipfs/ipfs.go
+++ b/cmd/ipfs/ipfs.go
@@ -59,6 +59,7 @@ Use "ipfs help <command>" for more information about a command.
 		cmdIpfsRun,
 		cmdIpfsName,
 		cmdIpfsBootstrap,
+		cmdIpfsDiag,
 	},
 	Flag: *flag.NewFlagSet("ipfs", flag.ExitOnError),
 }
diff --git a/peer/peer.go b/peer/peer.go
index ab071ea52dcad9d26a7dba4e3a01513a6f9b71f8..0961f3408418de86171f8b37c62aaccd0aa5c5e1 100644
--- a/peer/peer.go
+++ b/peer/peer.go
@@ -105,6 +105,10 @@ func (p *Peer) GetLatency() (out time.Duration) {
 // Yep, should be EWMA or something. (-jbenet)
 func (p *Peer) SetLatency(laten time.Duration) {
 	p.Lock()
-	p.latency = laten
+	if p.latency == 0 {
+		p.latency = laten
+	} else {
+		p.latency = ((p.latency * 9) + laten) / 10
+	}
 	p.Unlock()
 }