Merge pull request #2254 from pyhalov/mate