Handle defective certificates better.