Fix bad SQL in sh check