improved es.py, thanks mcamel and Vladyslav
fixed problem with ENABLED/DISABLED, issue 1689