bug with rectangular matrices