Flag was not rightly initialized when started in ES