Fix to only attempt Matrix cleaning if Matrix is installed.