diff --git a/imap.cabal b/imap.cabal
--- a/imap.cabal
+++ b/imap.cabal
@@ -2,7 +2,7 @@
 -- see http://haskell.org/cabal/users-guide/
 
 name:                imap
-version:             0.3.0.5
+version:             0.3.0.6
 synopsis:            An efficient IMAP client library, with SSL and streaming
 license:             BSD3
 license-file:        LICENSE
diff --git a/src/Network/IMAP.hs b/src/Network/IMAP.hs
--- a/src/Network/IMAP.hs
+++ b/src/Network/IMAP.hs
@@ -50,7 +50,9 @@
   fetchG,
   uidFetchG,
   store,
+  uidStore,
   copy,
+  uidCopy,
   simpleFormat
 ) where
 
@@ -294,7 +296,7 @@
 fetch conn query = sendCommand conn $ encodeUtf8 command
   where command = T.intercalate " " ["FETCH", query, "BODY[]"]
 
--- |Fetch message body my message UID
+-- |Fetch message body by message UID
 uidFetch :: (MonadPlus m, MonadIO m, Universe m) => IMAPConnection ->
   T.Text -> m CommandResult
 uidFetch conn query = sendCommand conn $ encodeUtf8 command
@@ -319,12 +321,26 @@
                                      encodeUtf8 dataItem, flagsToText flagList]
   sendCommand conn command
 
+uidStore :: (MonadPlus m, MonadIO m, Universe m) => IMAPConnection ->
+  T.Text -> T.Text -> [Flag] -> m CommandResult
+uidStore conn sequenceSet dataItem flagList = do
+  let command = BSC.intercalate " " ["UID STORE", encodeUtf8 sequenceSet,
+                                     encodeUtf8 dataItem, flagsToText flagList]
+  sendCommand conn command
 
+
 copy :: (MonadPlus m, MonadIO m, Universe m) => IMAPConnection ->
   T.Text -> T.Text -> m CommandResult
 copy conn sequenceSet mailboxName = sendCommand conn command
   where command = BSC.intercalate " " ["COPY", encodeUtf8 sequenceSet,
                                        encodeUtf8 mailboxName]
+
+-- |Copy message by message UID
+uidCopy :: (MonadPlus m, MonadIO m, Universe m) => IMAPConnection ->
+  T.Text -> T.Text -> m CommandResult
+uidCopy conn sequenceSet mailboxName = sendCommand conn $ encodeUtf8 command
+  where command = T.intercalate " " ["UID COPY", sequenceSet, mailboxName]
+
 
 -- |Return the untagged replies or an error message if the tagged reply
 --  is of type NO or BAD. Also return all untagged replies received if
diff --git a/src/Network/IMAP/Parsers/Untagged.hs b/src/Network/IMAP/Parsers/Untagged.hs
--- a/src/Network/IMAP/Parsers/Untagged.hs
+++ b/src/Network/IMAP/Parsers/Untagged.hs
@@ -184,7 +184,7 @@
 
 parseSearchResult :: Parser (Either ErrorMessage UntaggedResult)
 parseSearchResult = do
-  string "SEARCH "
-  msgIds <- AP.takeWhile1 isDigit `sepBy` char ' '
-  let parsedIds = mapM toInt msgIds
+  string "SEARCH"
+  msgIds <- AP.takeWhile isDigit `sepBy` char ' '
+  let parsedIds = mapM toInt (filter (/= "") msgIds)
   return $ liftM Search parsedIds
