fix some sqls