Index fix in readMatrix