Update patch file with a fix to matrix code