diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
 
+Version 5.3.1
+-----
+
+* Increased the speed of simulation.
+
 Version 5.3
 -----
 
diff --git a/Simulation/Aivika/Trans/Internal/Cont.hs b/Simulation/Aivika/Trans/Internal/Cont.hs
--- a/Simulation/Aivika/Trans/Internal/Cont.hs
+++ b/Simulation/Aivika/Trans/Internal/Cont.hs
@@ -271,7 +271,7 @@
   ContParamsAux { contECont :: SomeException -> Event m (),
                   contCCont :: () -> Event m (),
                   contId :: ContId m,
-                  contCancelFlag :: Event m Bool,
+                  contCancelRef :: Ref m Bool,
                   contCatchFlag  :: Bool }
 
 instance MonadDES m => Monad (Cont m) where
@@ -475,7 +475,7 @@
                    ContParamsAux { contECont = econt,
                                    contCCont = ccont,
                                    contId    = cid,
-                                   contCancelFlag = contCancellationActivated cid, 
+                                   contCancelRef = contCancellationActivatedRef cid, 
                                    contCatchFlag  = catchFlag } }
   
 liftWithoutCatching :: MonadDES m => m a -> Point m -> ContParams m a -> m ()
@@ -530,9 +530,9 @@
        else invokeEvent p $ (contECont $ contAux c) e
 
 -- | Test whether the computation is canceled.
-contCanceled :: ContParams m a -> Event m Bool
+contCanceled :: MonadDES m => ContParams m a -> Event m Bool
 {-# INLINE contCanceled #-}
-contCanceled c = contCancelFlag $ contAux c
+contCanceled c = readRef $ contCancelRef $ contAux c
 
 -- | Execute the specified computations in parallel within
 -- the current computation and return their results. The cancellation
diff --git a/aivika-transformers.cabal b/aivika-transformers.cabal
--- a/aivika-transformers.cabal
+++ b/aivika-transformers.cabal
@@ -1,5 +1,5 @@
 name:            aivika-transformers
-version:         5.3
+version:         5.3.1
 synopsis:        Transformers for the Aivika simulation library
 description:
     This package is a generalization of the aivika [1] simulation library
@@ -175,7 +175,7 @@
                      random >= 1.0.0.3,
                      mwc-random >= 0.13.0.0,
                      vector >= 0.10.0.1,
-                     aivika >= 5.3
+                     aivika >= 5.3.1
 
     other-extensions:   FlexibleContexts,
                         FlexibleInstances,
