Fixed offset bug in get_ip