fixed the way real-ip was obtained