find and fix matrix error