matRing bug fix for larget Mat