Fixed a bug where instance IPs are not sorted