Fixed connection in psql class