i am not sure that the code work but i change the initial value of the number of particles n = 200 and the problem seems to disappear.

will ask when need again :)