Fixed bug in editing by group