Fixed bugs in provisioner script