fix attach_ip

Haven't fixed attach_ip_from_pool 'cause I'm not really sure how that's used.