Correcting constructor call in factory method.