A few minor fixes
Merge branch 'postgres' into mongo