use setImmediate instead of process.nextTick to work with node 0.10.12