fix SQL command