Fix issue with build endpoint