fix some bugs with the photon beam