Fixed port number detection to be more precise
Merge pull request #1 from mandreko/port_number_precision

Fixed port number detection to be more precise