Fixed the matrix issue and line number problem