fixed read-matrices