fix factory bug
fix factory bug