bug fixed on ssl write block