Fixed first and last particle update.