Added local address resolver

Fixed local address calculation error