update: fixed a bug [only deal with the latest connection]