diff --git a/toolkit.py b/toolkit.py
index 86f3f2338d36f9598f61480fbbbda9981e17386a..67c1764df032c4b2ea77f45c4e360e4a58ab70b4 100755
--- a/toolkit.py
+++ b/toolkit.py
@@ -81,7 +81,7 @@ def load_from_dir(path):
         project_type = info["project_type"]
         if project_type == "ClassificationProjectRNN":
             return ClassificationProjectRNN(path)
-    except KeyError, IOError:
+    except (KeyError, IOError):
         pass
     return ClassificationProject(path)
 
@@ -705,7 +705,7 @@ class ClassificationProject(object):
             of.write(self._model.to_json())
 
         # plot model
-        with open(os.path.join(self.project_dir, "model.svg"), "w") as of:
+        with open(os.path.join(self.project_dir, "model.svg"), "wb") as of:
             of.write(model_to_dot(self._model).create("dot", format="svg"))