Switching from process.nextTick to async.setImmediate