Fixed the bug introduced while fixing other bug in out of bounds particle handling