nextTick hook