Fixed small bug when using on node.js