Fixes to node.js code