Fix issues with provision and deprovsion on Ubuntu