fix ssl shutdown management