Couchbase integration + bugfix