fix bounds checking for RGBPhotonBeam