Fixes for Windows
Merge branch 'postgres' into sqlite