fixes the bug with the assignment of the .mat arrays to the ff files (no memory problems anymore)