diff --git a/libmat2/office.py b/libmat2/office.py
index 6087c47f67e9e1141235c8c730c46309113d0746..e0ee6d2b95f1e077d6e488eefa1a23c8e86fe5b1 100644
--- a/libmat2/office.py
+++ b/libmat2/office.py
@@ -22,8 +22,7 @@ def _parse_xml(full_path: str):
     def parse_map(f):  # etree support for ns is a bit rough
         ns_map = dict()
         for event, (k, v) in ET.iterparse(f, ("start-ns", )):
-            if event == "start-ns":
-                ns_map[k] = v
+            ns_map[k] = v
         return ns_map
 
     ns = parse_map(full_path)
@@ -166,7 +165,7 @@ class MSOfficeParser(ArchiveBasedAbstractParser):
 
         elements = list()
         for element in tree.iterfind('.//w:ins', ns):
-            for position, item in enumerate(tree.iter()):
+            for position, item in enumerate(tree.iter()):  #pragma: no cover
                 if item == element:
                     for children in element.iterfind('./*'):
                         elements.append((element, position, children))
diff --git a/libmat2/torrent.py b/libmat2/torrent.py
index c1ea2ca1f404a8eff409c5b7e85caf253aaa6465..0f122b0d10dd2641b4db63e003cb0276e334a930 100644
--- a/libmat2/torrent.py
+++ b/libmat2/torrent.py
@@ -69,9 +69,11 @@ class _BencodeHandler(object):
     @staticmethod
     def __decode_string(s: bytes) -> Tuple[bytes, bytes]:
         colon = s.index(b':')
-        str_len = int(s[:colon])
-        if s[0] == '0' and colon != 1:
+        # FIXME Python3 is broken here, the call to `ord` shouldn't be needed,
+        # but apparently it is. This is utterly idiotic.
+        if (s[0] == ord('0') or s[0] == '0') and colon != 1:
             raise ValueError
+        str_len = int(s[:colon])
         s = s[1:]
         return s[colon:colon+str_len], s[colon+str_len:]
 
diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py
index 2bb1c76138a5a0b45024fa058f66006559c97494..20b1efa9ba78895d55ba5be2f7b58016ab4b48c7 100644
--- a/tests/test_corrupted_files.py
+++ b/tests/test_corrupted_files.py
@@ -80,7 +80,7 @@ class TestCorruptedFiles(unittest.TestCase):
             torrent.TorrentParser('./tests/data/clean.torrent')
 
         with open("./tests/data/clean.torrent", "w") as f:
-            f.write("d01:AAAAAAAAA")
+            f.write("01:AAAAAAAAA")
         with self.assertRaises(ValueError):
             torrent.TorrentParser('./tests/data/clean.torrent')