Fix Postgres detection