             }
         }
         
-        if count(remainingIds) == 0 {
+        if remainingIds.count == 0 {
             completion(loadedProducts, nil)
         }
         

    
    private func callLoadProductsCompletionForRequest(request: SKProductsRequest, responseProducts:Array<SKProduct>?, error: NSError?) {
        dispatch_async(dispatch_get_main_queue()) {
            for i in 0..<count(self.loadProductsRequests) {
                let requestInfo = self.loadProductsRequests[i]
                if requestInfo.request == request {
                    self.loadProductsRequests.removeAtIndex(i)

}

extension IAPManager: SKProductsRequestDelegate {
    func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {
        for product in response.products {
            availableProducts[product.productIdentifier] = product
        }
        
        callLoadProductsCompletionForRequest(request, responseProducts: response.products, error: nil)
    }
    
    func request(request: SKRequest, didFailWithError error: NSError) {
        if let productRequest = request as? SKProductsRequest {
            callLoadProductsCompletionForRequest(productRequest, responseProducts: nil, error: error)
        }
