Changing process.nextTick for setImmediate