fixed hanging in later node versions