Fix warning in ES check