Attempts to fix the build and other discovered issues.