Fixed a bug in identifying the security groups associated with an instance