Fixing fallback from IPv6 to IPv4
Fix fall-back from IPv6 to IPv4

Professionalism edits
Merge pull request #85 from micrictor/master

Fixing fall-back from IPv6 to IPv4
small optimization