Fixed the setSecurityGroup method to work always with 32bit integers