bug fix

premature loop exit