Fixes a RIGHTEOUS bug in matrices.