Fix some bugs with provisioning on a fresh system.