Fixes IP detection.