fixes the matrix file missing bug.