fixing bug with multiple paths with no resistance