upgrade pouchdb, fix bugs