Correction bug randomize matrix