Fixes to make the app work with Postgres