Added mechanism to stop the nodes as well