fixed mat error

get mat by matid