Fix bug in es-apply-settings