Fixed an endless loop in captcha service