Fix: factory should be called only one time depending on the environment
Merge pull request #8 from Narsul/master

Fix: factory should be called only one time depending on the environment