fix build to work in CI and deploy environments