added nextTick for async callbacks