close on the nexttick