fix broken sql/psql