fixed factory bug