fixing compare function, in iOS 7.0 B+w and RGB needed to be handled separately.