bug fix in genAPDescriptors. resulted in bad descriptors being generated