Fix bug: oneway reversed values affected to_cost (should length)