bug fix- ensure that we get correct num clients

ensure that we get the correct number of clients by breaking when
necessary