fix group task logic