Merge remote branch 'cloudant:68151-fix-rexi_DOWN-handler'

This closes #57

Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
diff --git a/src/fabric_doc_open_revs.erl b/src/fabric_doc_open_revs.erl
index 0924313..9228991 100644
--- a/src/fabric_doc_open_revs.erl
+++ b/src/fabric_doc_open_revs.erl
@@ -160,8 +160,10 @@
 
 
 dict_replies(Dict, []) ->
-    Counts = [Count || {_Key, {_Reply, Count}} <- Dict],
-    {Dict, lists:min(Counts)};
+    case [Count || {_Key, {_Reply, Count}} <- Dict] of
+        [] -> {Dict, 0};
+        Counts -> {Dict, lists:min(Counts)}
+    end;
 
 dict_replies(Dict, [Reply | Rest]) ->
     NewDict = fabric_util:update_counter(Reply, 1, Dict),