Fixed incorrect comparison for port numbers above 65535