Fix CommonJS factory invoking bug.