diff --git a/modules/bindings/pymod/ialign.py b/modules/bindings/pymod/ialign.py
index 2c6090102018617b9e727afcdea3f9d722c8f87a..176a5dbe46360b271f7baf0738f71e4300348e43 100644
--- a/modules/bindings/pymod/ialign.py
+++ b/modules/bindings/pymod/ialign.py
@@ -140,9 +140,12 @@ def _RuniAlign(ialign, tmp_dir, options={}):
   else:
     ialign_path=settings.Locate('ialign.pl', explicit_file_name=ialign)  
     command="\"%s\" \"%s\" \"%s\" %s" % (ialign_path, model1_filename, model2_filename, cmd_opts)
-  ps=subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
+
+  ps=subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
+                      universal_newlines=True)
   ps.wait()
   lines=ps.stdout.readlines()
+
   if (len(lines))<22:
     _CleanupFiles(tmp_dir)
     #for l in lines: