Adapted to latest changes in Puli