Fix CommonJS factory invoking bug.
Merge branch 'develop'