Improvements to MATE environment discovery