Fix PouchDB issues