fix "new note bug"/a bunch of pouchdb interactions