Fix automatic IP detection