Remove deprecated api usage.