Fix deployment and undeployment issues for worker nodes in cluster