Fixed factory
Merge pull request #322 from jerv13/master

Fixed factory