make the provisioning slightly more robust - still need more testing