Handling disconnected components