diff --git a/h2o-py/h2o/group_by.py b/h2o-py/h2o/group_by.py
index <HASH>..<HASH> 100644
--- a/h2o-py/h2o/group_by.py
+++ b/h2o-py/h2o/group_by.py
@@ -2,7 +2,7 @@ from __future__ import print_function
 from __future__ import absolute_import
 from past.builtins import basestring
 from .expr import ExprNode
-from . import h2o
+import h2o
 
 
 class GroupBy:
diff --git a/h2o-py/h2o/h2o.py b/h2o-py/h2o/h2o.py
index <HASH>..<HASH> 100644
--- a/h2o-py/h2o/h2o.py
+++ b/h2o-py/h2o/h2o.py
@@ -511,7 +511,7 @@ def download_pojo(model,path="", get_jar=True):
   print("Filepath: {}".format(filepath))
   if path == "": print(java.text)
   else:
-    with open(filepath, 'wb') as f:
+    with open(filepath, 'w') as f:
       f.write(java.text)
   if get_jar and path!="":
     url = H2OConnection.make_url("h2o-genmodel.jar")
stupid relative imports don't work in py2