matrix out path fix