fix bug when there are more than one server with the same host and the same port