Fixed problem with MAT coruses