Fixed disconnecting bug.
Changed ip to id to avoid potential same ip issue