Fix already generated detection.