Matrix was one too small in both dimensions.  Small bugs in creation of matrices.  Traceback was not doing things right, fixed.