diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[![Build Status](https://travis-ci.org/Copilot-Language/copilot-c99.svg?branch=master)](https://travis-ci.org/Copilot-Language/copilot-c99)
+
 Overview
 ========
 This package is a Copilot back-end that targets Atom
diff --git a/copilot-c99.cabal b/copilot-c99.cabal
--- a/copilot-c99.cabal
+++ b/copilot-c99.cabal
@@ -1,6 +1,6 @@
 cabal-version             : >= 1.10
 name                      : copilot-c99
-version                   : 2.1.2
+version                   : 2.2.0
 synopsis                  : A compiler for Copilot targeting C99.
 description               :
   This package is a back-end from Copilot to the Atom DSL.
@@ -36,13 +36,13 @@
   default-language        : Haskell2010
   hs-source-dirs          : src
   ghc-options             : -Wall -fwarn-tabs
-  ghc-prof-options        : -auto-all -caf-all
+--  ghc-prof-options        : -auto-all -caf-all
 
-  build-depends           : atom >= 1.0.10
+  build-depends           : atom >= 1.0.13
                           , base >= 4.3 && < 5
                           , bytestring
                           , containers >= 0.4
-                          , copilot-core
+                          , copilot-core == 2.2.0
                           , csv
                           , directory >= 1.1
                           , process >= 1.0
@@ -77,7 +77,7 @@
                           , bytestring
                           , csv
                           , containers >= 0.4
-                          , copilot-core
+                          , copilot-core == 2.2.0
                           , directory >= 1.1
                           , process >= 1.0
                           , pretty >= 1.0
diff --git a/src/Copilot/Compile/C99/Queue.hs b/src/Copilot/Compile/C99/Queue.hs
--- a/src/Copilot/Compile/C99/Queue.hs
+++ b/src/Copilot/Compile/C99/Queue.hs
@@ -30,7 +30,7 @@
     } =
   do
     (buf ! value p) <== x
-    p <== mux (value p + 1 >=. fromIntegral sz) 0 (value p + 1)
+    p <== ((value p + 1) `mod_` fromIntegral sz)
 
 lookahead :: Expr a => Int -> Queue a -> E a
 lookahead i
