Changes to make subdivision work for tmat