Changed the way of finding local addresses.