Bug on random large numbers fixed

Reusable matrixes cleaned every time before writing in