fix a sql build bug