Fix for modifying NSMutableArray during enumeration
Implemented setting comparison