Force coefficient matrix to be square

Force coefficient matrix to be square.