repair bug in isMatrix arrenged