fix sql build