Fixed a crash related to empty certificates sent from client