fix a bug in CPDI2 3D, not done yet