fix build and bring back some missing code from openacd integration branch