Fixed bugs in editor by groups logic