Adapted to most recent pathbuilder version