Fixes #1225

Small fix for `mat` method