diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## v0.2.1.1 - 2014-04-22
+
+* Bug fix: Treat as integer if base10Exponent is positive
+
 ## v0.2.1 - 2014-04-22
 
 * Add `stripPrefixSnake`
diff --git a/influxdb.cabal b/influxdb.cabal
--- a/influxdb.cabal
+++ b/influxdb.cabal
@@ -1,5 +1,5 @@
 name: influxdb
-version: 0.2.1
+version: 0.2.1.1
 synopsis: Haskell client library for InfluxDB
 description: Haskell client library for InfluxDB
 homepage: https://github.com/maoe/influxdb-haskell
@@ -113,5 +113,5 @@
 
 source-repository this
   type: git
-  tag: v0.2.1
+  tag: v0.2.1.1
   location: https://github.com/maoe/influxdb-haskell.git
diff --git a/src/Database/InfluxDB/TH.hs b/src/Database/InfluxDB/TH.hs
--- a/src/Database/InfluxDB/TH.hs
+++ b/src/Database/InfluxDB/TH.hs
@@ -72,7 +72,7 @@
     tyVarToPred tv = case tv of
       PlainTV name -> classP ''FromValue [varT name]
       KindedTV name _ -> classP ''FromValue [varT name]
-    deriveDecs conName vars = do
+    deriveDecs _conName vars = do
       a <- newName "a"
       sequence
         [ funD 'toSeriesColumns
diff --git a/src/Database/InfluxDB/Types.hs b/src/Database/InfluxDB/Types.hs
--- a/src/Database/InfluxDB/Types.hs
+++ b/src/Database/InfluxDB/Types.hs
@@ -139,8 +139,10 @@
     where
 #if MIN_VERSION_aeson(0, 7, 0)
       numberToValue
-        | base10Exponent n == 0 = Int $ fromIntegral $ coefficient n
-        | otherwise = Float $ realToFrac n
+        | e < 0 = Float $ realToFrac n
+        | otherwise = Int $ fromIntegral $ coefficient n * 10 ^ e
+        where
+          e = base10Exponent n
 #else
       numberToValue = case n of
         I i -> Int $ fromIntegral i
