             result = context.executeFetchRequest(fetchRequest, error: &error) as? [NSManagedObject]
         }
         
-        return (result!, error)
+        return (result, error)
         
     }
     

            result = context.executeFetchRequest(fetchRequest, error: &error) as? [NSManagedObject]
        }
        
        return (result!.first, error)
    }
    
    private func fetchEntity(entity: NSEntityDescription, withResourceIDs resourceIDs: [UInt], usingContext context: NSManagedObjectContext, shouldPrefetch: Bool) -> ([NSManagedObject], NSError?) {
        
        let fetchRequest = NSFetchRequest(entityName: entity.name!)
        
        fetchRequest.fetchLimit = 1
        
        fetchRequest.predicate = NSComparisonPredicate(leftExpression: NSExpression(forKeyPath: self.resourceIDAttributeName), rightExpression: NSExpression(forConstantValue: resourceIDs), modifier: NSComparisonPredicateModifier.DirectPredicateModifier, type: NSPredicateOperatorType.InPredicateOperatorType, options: NSComparisonPredicateOptions.NormalizedPredicateOption)
        

                    
                    // make sure all the values are present and have the correct permissions...
                    
                    if newValue!.count != destinationResourceIDs?.count {
                        
                        return ServerStatusCode.BadRequest
                    }
                    
                    for destinationResourceID in destinationResourceIDs! {
                        
                        let destinationResource = newValue![find(destinationResourceIDs!, destinationResourceID)!]
                        
                        // destination resource must be visible
                        if self.permissionsEnabled {
