workaround for process.nextTick