More fixes to matrix class.