Fixes for postgres deploy