bugfix memory leak with addGroup