diff --git a/Graphics/Curves/Math.hs b/Graphics/Curves/Math.hs
--- a/Graphics/Curves/Math.hs
+++ b/Graphics/Curves/Math.hs
@@ -27,7 +27,6 @@
   ) where
 
 import Control.Applicative
-import Test.QuickCheck
 
 type Scalar = Double
 
diff --git a/Graphics/Curves/SVG/Path.hs b/Graphics/Curves/SVG/Path.hs
--- a/Graphics/Curves/SVG/Path.hs
+++ b/Graphics/Curves/SVG/Path.hs
@@ -35,15 +35,50 @@
   show (TokCmd c)    = [c]
   show (TokNum x) = show x
 
+lexNum :: String -> Maybe (String, String)
+lexNum s = start s
+  where
+    eat c = fmap (\(a, b) -> (c:a, b))
+    ret s = Just ("", s)
+    bad   = Nothing
+
+    start ('-':s) = eat '-' $ num s
+    start s       = num s
+
+    num (c:s) | isDigit c = eat c $ num1 s
+    num _ = bad
+
+    num1 (c:s) | isDigit c = eat c $ num1 s
+    num1 ('.':s) = eat '.' $ frac s
+    num1 ('e':s) = eat 'e' $ expn s
+    num1 s       = ret s
+
+    frac (c:s) | isDigit c = eat c $ frac1 s
+
+    frac1 (c:s) | isDigit c = eat c $ frac1 s
+    frac1 ('e':s) = eat 'e' $ expn s
+    frac1 s = ret s
+
+    expn ('-':s) = eat '-' $ expn1 s
+    expn s = expn1 s
+
+    expn1 (c:s) | isDigit c = eat c $ expn2 s
+    expn1 _ = bad
+
+    expn2 (c:s) | isDigit c = eat c $ expn2 s
+    expn2 s = ret s
+
 lexPath :: String -> [PathToken]
 lexPath [] = []
 lexPath (c:s)
   | isAlpha c   = TokCmd c : lexPath s
-  | isNumChar c = case span isNumChar s of
-      (d, s') -> TokNum (read (c:d)) : lexPath s'
+  | isNumChar c =
+    case lexNum (c:s) of
+      Just (d, s') -> TokNum (read d) : lexPath s'
+      Nothing      -> error $ "lex error on " ++ show (take 25 (c:s)) ++ "..."
   | otherwise   = lexPath s
   where
-    isNumChar c = isDigit c || elem c "-."
+    isNumChar c = isDigit c || c == '-'
 
 -- | Read a path string.
 parsePath :: String -> Path
@@ -93,6 +128,7 @@
         argsN :: Int -> Char -> ([Scalar] -> PathCmd) -> [PathToken] -> Path
         argsN n c f ts
           | all isNum xs = f (map getNum xs) : next c ts'
+          | otherwise    = error $ "Expected " ++ show n ++ " numerical arguments to " ++ show c ++ ". Got: " ++ show xs
           where
             (xs, ts') = splitAt n ts
 
diff --git a/curves.cabal b/curves.cabal
--- a/curves.cabal
+++ b/curves.cabal
@@ -1,5 +1,5 @@
 Name:               curves
-Version:            1.1.0.1
+Version:            1.1.0.2
 Category:           Graphics
 License:            MIT
 License-file:       LICENSE
@@ -40,7 +40,7 @@
                     containers >= 0.4,
                     filepath >= 1.3,
                     JuicyPixels >= 2.0
-  Exposed-Modules:  
+  Exposed-Modules:
                     Graphics.Curves
                     Graphics.Curves.Attribute
                     Graphics.Curves.Colour
@@ -52,7 +52,7 @@
                     Graphics.Curves.SVG.Path
                     Graphics.Curves.Text
                     Graphics.Curves.Text.Fonts.Liberation
-  Other-Modules:    
+  Other-Modules:
                     Graphics.Curves.BoundingBox
                     Graphics.Curves.Compile
                     Graphics.Curves.Curve
