fixed EClosure function