Fixes #2

https://github.com/couchbaselabs/sg-replicate/issues/2