fix sql scores issue