diff --git a/robots-txt.cabal b/robots-txt.cabal
--- a/robots-txt.cabal
+++ b/robots-txt.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                robots-txt
-version:             0.3.0.0
+version:             0.3.0.1
 synopsis:            Parser for robots.txt
 description:         This is an attoparsec parser for robots.txt files
 homepage:            http://github.com/meanpath/robots
diff --git a/src/Network/HTTP/Robots.hs b/src/Network/HTTP/Robots.hs
--- a/src/Network/HTTP/Robots.hs
+++ b/src/Network/HTTP/Robots.hs
@@ -80,15 +80,17 @@
 canAccess agent (robot,_) path = case stanzas of
   [] -> True
   ((_,directives):_) -> matchingDirective directives
-  where stanzas = catMaybes [find ((Literal agent `elem`) . fst) robot,
+  where stanzas = catMaybes [find ((any (`isLiteralSubstring` agent))  . fst) robot,
                              find ((Wildcard `elem`) . fst) robot]
+
+
+        isLiteralSubstring (Literal a) us = a `BS.isInfixOf` us
+        isLiteralSubstring _ _ = False
         matchingDirective [] = True
         matchingDirective (x:xs) = case x of
-          Allow robot_path -> if robot_path `BS.isPrefixOf` path
-                              then True
-                              else matchingDirective xs
+          Allow robot_path ->
+            robot_path `BS.isPrefixOf` path || matchingDirective xs
           Disallow robot_path ->
-            if robot_path `BS.isPrefixOf` path
-            then False
-            else matchingDirective xs
+            (not $ robot_path `BS.isPrefixOf` path) && matchingDirective xs
+
           _ -> matchingDirective xs
