Fixes to deploy scripts