couchbase-sync-gateway fixes