Fix state bug in STARTTLS