fixed server cert check bug