Applied patches and deployment script fixed