Fix bug while creating groups with focus on dependencies