Added a check for an ensemble to call/close editor