Added compatibility for different add_particle calls (apparently there is some contention as of late).