fix bug of sqlalchemy