fixed parts.mat generation