Fixed #3501: modify some codes for NPM

Modify some codes for NPM