Photon dectection as an explaination for gain non-linearity