fix bug of sql.py