clean up segment task