Added some safety features to the particle effect