Fixed an annoying bug with updating particle positions