fix bug : static factory variable not init in library