(#477) - Fix race condition in db.changes
Merge pull request #520 from adampolak/477-fix-race-condition

(#477) - Fix race condition in db.changes