Use the standard dot-decimal notation for IPv4 addresses
Avoid overflow in port number calculation
Merge pull request #2 from johto/bugfixes

Fix two bugs