fix issue with MatID type