Fixed the function to make a matrix out of vectors.