Fix floatingip algorithm. Fix tests.