fix error in newer versions of node