Minor changes to getmatrix