Use setImmediate instead of nextTick in node