         }
 
         let isCancelled: () -> Bool = { [weak self] in
-            return self != nil
+            return self == nil
         }
         
         resolver(fulfill: weakFulfill, reject: weakReject, isCancelled: isCancelled)

                onRejected.removeAll(keepCapacity: false)
            case .Deferred(let promise):
                assert(promise !== self, "A promise referencing itself causes an unbreakable retain cycle, and an infinite loop")
                
                promise.thenOn(
                    synchronizationQueue,
                    onFulfilled: { [weak self] (value: T) -> Result<T> in
                        let result: Result<T> = Result(value)

    private func transition(result: Result<T>) {
        switch state {
        case .Pending:
            switch result {
            case .Success(let value):
                self.result = result
                state = .Fulfilled
                for fulfillHandler in onFulfilled {
                    fulfillHandler(value.unwrap)
