Fix ip and query for ip