corrected captcha functionality