Update to work with large matrix.