total path cost fix