[PD] porting a Pd patch to Max license issues