fix static factory bug