Fixed a bug with instance IPs not being sorted