Fixes to deployment and destroy tasks