A few minor fixes
Merge branch 'postgres' into sqlite