     # Stop running replications and stop
     cancelReplication: ->
         clearTimeout replication.timeout
-        replication.replicator.cancel() if replication.replicator?
+        replication.replicatorFrom.cancel() if replication.replicatorFrom?
+        replication.replicatorTo.cancel() if replication.replicatorTo?
         replication.timeout = null
-        replication.replicator = null
+        replication.replicatorFrom = null
+        replication.replicatorTo = null

                doc.docType is 'Folder' or doc.docType is 'File'
            live: true
            since: config.getChangeSeq()
        replication.replicator = pouch.db.replicate.to(url, opts)
            .on 'change', replication.displayChange
            .on 'uptodate', replication.displayChange
            .on 'error', replication.onError

                doc.docType is 'Folder' or doc.docType is 'File'
            live: true
            since: config.getSeq()
        replication.replicatorFrom = pouch.db.replicate.from(url, opts)
            .on 'change', replication.displayChange
            .on 'uptodate', replication.onSyncUpdate
            .on 'error', replication.onError
