Fixed first and last particle update.
Merge pull request #7 from labe-me/patch-4

Fixed first and last particle update.