better IP detection