fix bug for sql
fix bug for sql