fix bug of inverse of 2x2 & 3x3 matrices