fixed bug in getParticlesListIndex function