Changed generated code for ES delegation