diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,9 +11,11 @@
         Numeric.LinearAlgebra.Data
         Numeric.LinearAlgebra.Devel
 
-      The documentation is now hidden for Data.Packed.*, Numeric.Container, and
+      For normal usage we only need to import Numeric.LinearAlgebra.HMatrix.
+
+      (The documentation is now hidden for Data.Packed.*, Numeric.Container, and
       the other Numeric.LinearAlgebra.* modules, but they continue to be exposed
-      for backwards compatibility.
+      for backwards compatibility.)
 
     * Added support for empty arrays, extending automatic conformability
       (very useful for construction of block matrices).
diff --git a/THANKS.md b/THANKS.md
--- a/THANKS.md
+++ b/THANKS.md
@@ -139,7 +139,8 @@
 
 - Clemens Lang updated the MacPort installation instructions.
 
-- Henning Thielemann reported the pinv inefficient implementation.
+- Henning Thielemann reported the pinv inefficient implementation and the need of
+  pkgconfig-depends.
 
 - bdoering reported the problem of zero absolute tolerance in the integration functions.
 
@@ -156,4 +157,14 @@
 - Samium Gromoff reported a build failure caused by a size_t - int mismatch.
 
 - Denis Laxalde separated the gsl tests from the base ones.
+
+- Dominic Steinitz (idontgetoutmuch) reported a bug in the static diagonal creation functions.
+
+- Dylan Thurston reported an error in the glpk documentation and ambiguity in
+  the description of linearSolve.
+
+- Adrian Victor Crisciu developed an installation method for platforms which
+  don't provide shared lapack libraries.
+
+- Ian Ross reported the max/minIndex bug.
 
diff --git a/hmatrix.cabal b/hmatrix.cabal
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -1,5 +1,5 @@
 Name:               hmatrix
-Version:            0.16.0.4
+Version:            0.16.0.5
 License:            BSD3
 License-file:       LICENSE
 Author:             Alberto Ruiz
diff --git a/src/C/vector-aux.c b/src/C/vector-aux.c
--- a/src/C/vector-aux.c
+++ b/src/C/vector-aux.c
@@ -172,7 +172,7 @@
 double vector_max_index(KDVEC(x)) {
     int k, r = 0;
     for (k = 1; k<xn; k++) {
-        if(xp[k]>xp[0]) {
+        if(xp[k]>xp[r]) {
             r = k;
         }
     }
@@ -182,7 +182,7 @@
 double vector_min_index(KDVEC(x)) {
     int k, r = 0;
     for (k = 1; k<xn; k++) {
-        if(xp[k]<xp[0]) {
+        if(xp[k]<xp[r]) {
             r = k;
         }
     }
@@ -237,7 +237,7 @@
 float vector_max_index_f(KFVEC(x)) {
     int k, r = 0;
     for (k = 1; k<xn; k++) {
-        if(xp[k]>xp[0]) {
+        if(xp[k]>xp[r]) {
             r = k;
         }
     }
@@ -247,7 +247,7 @@
 float vector_min_index_f(KFVEC(x)) {
     int k, r = 0;
     for (k = 1; k<xn; k++) {
-        if(xp[k]<xp[0]) {
+        if(xp[k]<xp[r]) {
             r = k;
         }
     }
diff --git a/src/Data/Packed/Numeric.hs b/src/Data/Packed/Numeric.hs
--- a/src/Data/Packed/Numeric.hs
+++ b/src/Data/Packed/Numeric.hs
@@ -160,7 +160,29 @@
 
 --------------------------------------------------------------------------------
 
--- | least squares solution of a linear system, similar to the \\ operator of Matlab\/Octave (based on linearSolveSVD)
+{- | Least squares solution of a linear system, similar to the \\ operator of Matlab\/Octave (based on linearSolveSVD)
+
+@
+a = (3><2)
+ [ 1.0,  2.0
+ , 2.0,  4.0
+ , 2.0, -1.0 ]
+@
+
+@
+v = vector [13.0,27.0,1.0]
+@
+
+>>> let x = a <\> v
+>>> x
+fromList [3.0799999999999996,5.159999999999999]
+
+>>> a #> x
+fromList [13.399999999999999,26.799999999999997,1.0]
+
+It also admits multiple right-hand sides stored as columns in a matrix.
+
+-}
 infixl 7 <\>
 (<\>) :: (LSDiv c, Field t) => Matrix t -> c t -> c t
 (<\>) = linSolve
diff --git a/src/Numeric/LinearAlgebra/HMatrix.hs b/src/Numeric/LinearAlgebra/HMatrix.hs
--- a/src/Numeric/LinearAlgebra/HMatrix.hs
+++ b/src/Numeric/LinearAlgebra/HMatrix.hs
@@ -194,7 +194,37 @@
 mul = mXm
 
 
--- | Solve a linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, returning Nothing for a singular system. For underconstrained or overconstrained systems use 'linearSolveLS' or 'linearSolveSVD'. 
+{- | Solve a linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, returning Nothing for a singular system. For underconstrained or overconstrained systems use 'linearSolveLS' or 'linearSolveSVD'.
+
+@
+a = (2><2)
+ [ 1.0, 2.0
+ , 3.0, 5.0 ]
+@
+
+@
+b = (2><3)
+ [  6.0, 1.0, 10.0
+ , 15.0, 3.0, 26.0 ]
+@
+
+>>> linearSolve a b
+Just (2><3)
+ [ -1.4802973661668753e-15,     0.9999999999999997, 1.999999999999997
+ ,       3.000000000000001, 1.6653345369377348e-16, 4.000000000000002 ]
+
+>>> let Just x = it
+>>> disp 5 x
+2x3
+-0.00000  1.00000  2.00000
+ 3.00000  0.00000  4.00000
+
+>>> a <> x
+(2><3)
+ [  6.0, 1.0, 10.0
+ , 15.0, 3.0, 26.0 ]
+
+-}
 linearSolve m b = A.mbLinearSolve m b
 
 -- | return an orthonormal basis of the null space of a matrix. See also 'nullspaceSVD'.
diff --git a/src/Numeric/LinearAlgebra/Static.hs b/src/Numeric/LinearAlgebra/Static.hs
--- a/src/Numeric/LinearAlgebra/Static.hs
+++ b/src/Numeric/LinearAlgebra/Static.hs
@@ -512,7 +512,10 @@
 --------------------------------------------------------------------------------
 
 diagRectR :: forall m n k . (KnownNat m, KnownNat n, KnownNat k) => ℝ -> R k -> L m n
-diagRectR x v = r
+diagRectR x v
+    | m' == 1 = mkL (LA.diagRect x ev m' n')
+    | m'*n' > 0 = r
+    | otherwise = matrix []
   where
     r = mkL (asRow (vjoin [scalar x, ev, zeros]))
     ev = extract v
@@ -521,7 +524,10 @@
 
 
 diagRectC :: forall m n k . (KnownNat m, KnownNat n, KnownNat k) => ℂ -> C k -> M m n
-diagRectC x v = r
+diagRectC x v
+    | m' == 1 = mkM (LA.diagRect x ev m' n')
+    | m'*n' > 0 = r
+    | otherwise = fromList []
   where
     r = mkM (asRow (vjoin [scalar x, ev, zeros]))
     ev = extract v
diff --git a/src/Numeric/LinearAlgebra/Static/Internal.hs b/src/Numeric/LinearAlgebra/Static/Internal.hs
--- a/src/Numeric/LinearAlgebra/Static/Internal.hs
+++ b/src/Numeric/LinearAlgebra/Static/Internal.hs
@@ -150,7 +150,7 @@
     (xs,rest) = splitAt (m'*n') xs'
     v = LA.fromList xs
     x = reshape n' v
-    ok = rem (LA.size v) n' == 0 && LA.size x == (m',n') && null rest
+    ok = null rest && ((n' == 0 && dim v == 0) || n'> 0 && (rem (LA.size v) n' == 0) && LA.size x == (m',n'))
     m' = fromIntegral . natVal $ (undefined :: Proxy m) :: Int
     n' = fromIntegral . natVal $ (undefined :: Proxy n) :: Int
     abort info = error $ st ++" "++show m' ++ " " ++ show n'++" can't be created from elements " ++ info
