fix code for node.js