Fixed getsockname call