automatically call nextTick on some synchronous function calls