fixed minor bug in waiting for nodes