deallocate matrixes to fix a problem