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/Internal/Cont.hs b/Simulation/Aivika/Internal/Cont.hs
--- a/Simulation/Aivika/Internal/Cont.hs
+++ b/Simulation/Aivika/Internal/Cont.hs
@@ -255,7 +255,7 @@
   ContParamsAux { contECont :: SomeException -> Event (),
                   contCCont :: () -> Event (),
                   contId :: ContId,
-                  contCancelFlag :: IO Bool,
+                  contCancelRef :: IORef Bool,
                   contCatchFlag  :: Bool }
 
 instance Monad Cont where
@@ -405,7 +405,7 @@
                    ContParamsAux { contECont = econt,
                                    contCCont = ccont,
                                    contId = cid,
-                                   contCancelFlag = contCancellationActivated cid, 
+                                   contCancelRef = contCancellationActivatedRef cid, 
                                    contCatchFlag  = catchFlag } }
 
 -- | Lift the 'Parameter' computation.
@@ -505,7 +505,7 @@
 -- | Test whether the computation is canceled.
 contCanceled :: ContParams a -> IO Bool
 {-# INLINE contCanceled #-}
-contCanceled c = contCancelFlag $ contAux c
+contCanceled c = readIORef $ contCancelRef $ contAux c
 
 -- | Execute the specified computations in parallel within
 -- the current computation and return their results. The cancellation
diff --git a/aivika.cabal b/aivika.cabal
--- a/aivika.cabal
+++ b/aivika.cabal
@@ -1,5 +1,5 @@
 name:            aivika
-version:         5.3
+version:         5.3.1
 synopsis:        A multi-method simulation library
 description:
     Aivika is a discrete event simulation (DES) framework with support of activity-oriented,
