                 
                 // validate NSUInteger bitmask
                 
-                if optionNumber == nil || optionNumber != NSComparisonPredicateOptions.NormalizedPredicateOption.rawValue || optionNumber != NSComparisonPredicateOptions.DiacriticInsensitivePredicateOption.rawValue || optionNumber != NSComparisonPredicateOptions.CaseInsensitivePredicateOption.rawValue {
+                if optionNumber == nil || (optionNumber != NSComparisonPredicateOptions.NormalizedPredicateOption.rawValue && optionNumber != NSComparisonPredicateOptions.DiacriticInsensitivePredicateOption.rawValue && optionNumber != NSComparisonPredicateOptions.CaseInsensitivePredicateOption.rawValue) {
                     
                     let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
                     

        // set new values from dictionary
        context.performBlockAndWait({ () -> Void in
            
            managedObject?.setValuesForKeysWithDictionary(newValues)
            
            return
        })
        
        // perform Core Data validation (to make sure there will be no errors saving)

                        return (response, userInfo)
                    }
                    
                    let (fetchResult, error) = self.fetchEntity(relationshipDescription!.destinationEntity!, withResourceIDs: resourceIDs!, usingContext: context, shouldPrefetch: false)
                    
                    // error fetching
                    if error != nil {
