fix small bug when using on node.js