terminate shut down nodes properly