Fixed bad-security groups detection