Handle ungrouping and disconnection