NPE 's been fixed. set a lock object to protect a host name and a port of a new master