Bunch of fixes while troubleshooting the deployment.