fix photon matching