Fix nodejs issues to pass tests