fix bug of rect and matrix

title