improve real client ip logic