Fix a reset bug for Node.js