Changed the CPEnd loop check to an exact match.
Changed ProcessFifoAllDistance back to how it was.