Added state invalidation when a client leaves the server