Fix for not destroying sessions when connection closed.