Fixed couchbase python query issues