Fixed a bug regarding to cleaning up inactive networking sessions.