fixed a few bugs while testing iOS-Couchbase-Demo