Fix leaky set issue