Fixed getsockname issue