fix cpu 100% issue and certificate validation.