Issue #91. More fixes for IP detection.