fix psql detection