fix commands based on spm-psql