NEW_GEN: Better fix for the re-reversing of the matrix sizes.