I'm guessing there are some picking issues in these events.
If every laserbeam has sparks it would probably be much easier to put the sparks in a container with the laserbeam, so when referencing the laserbeam the sparks are referenced automatically.
That would take away the need for the id=uid check.