Better loss path removal algorithm.