Last changes. Little fix to finding longest path.