SO MANY DATABASE FIXES (revs and ids)