diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/AllocatePackagePhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/AllocatePackagePhoneNumbers.ascx.cs index c328b975..c9c6c23a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/AllocatePackagePhoneNumbers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/AllocatePackagePhoneNumbers.ascx.cs @@ -97,7 +97,7 @@ namespace WebsitePanel.Portal.UserControls } // bind controls - int max = quotaAllowed == -1 ? listExternalAddresses.Items.Count : quotaAllowed; + int max = quotaAllowed == -1 ? listExternalAddresses.Items.Count : Math.Min(quotaAllowed, listExternalAddresses.Items.Count); txtExternalAddressesNumber.Text = max.ToString(); litMaxAddresses.Text = String.Format(GetLocalizedString("litMaxAddresses.Text"), max);