Remove MAT

Fix #497