fix SASL loop logic (thanks @behackett)