fixed pgsql backend