fix SQL tests