Various fixes to the cluster script.