now fix the bug after client disconnected