Fixed query always gets the same IP addresses

Signed-off-by: Lilis Iskandar <veeableful@gmail.com>