fix sql infinite loop