Some adjustments on the newInstance API