clean up and nextTick