Fix bugs in nodepool-scripts