Deployment script fixes