Updated script to fix a number of issues encountered when provisioning the VM