diff --git a/helios/datatypes/legacy.py b/helios/datatypes/legacy.py
index 766ed9212b028b109fa42d2182922f348d28aab2..c0a24ffc2ab2d0540d2953adf7469cd2f7c98e66 100644
--- a/helios/datatypes/legacy.py
+++ b/helios/datatypes/legacy.py
@@ -176,7 +176,7 @@ class DLogProof(LegacyObject):
 
     def __init__(self, wrapped_obj):
         if isinstance(wrapped_obj, dict):
-            import pdb; pdb.set_trace()
+            raise Exception("problem with dict")
 
         super(DLogProof,self).__init__(wrapped_obj)
 
diff --git a/helios_auth/auth_systems/openid/view_helpers.py b/helios_auth/auth_systems/openid/view_helpers.py
index cfdb4e6dfe855ccf8b17c1ed14a5e92d9cd8dc16..06eef8a287bbbf0d5a05d32d8ed0e13939761eac 100644
--- a/helios_auth/auth_systems/openid/view_helpers.py
+++ b/helios_auth/auth_systems/openid/view_helpers.py
@@ -65,7 +65,6 @@ def start_openid(session, openid_url, trust_root, return_to):
         error = "OpenID discovery error: %s" % (str(e),)
 
     if error:
-        import pdb; pdb.set_trace()
         raise Exception("error in openid")
 
     # Add Simple Registration request information.  Some fields
diff --git a/helios_auth/security/__init__.py b/helios_auth/security/__init__.py
index 373c9dace1dd4d32bc51d75e0a62dbaf8524e00d..b036067d9b837e4156df46fd9a6efdc78516b98f 100644
--- a/helios_auth/security/__init__.py
+++ b/helios_auth/security/__init__.py
@@ -95,7 +95,7 @@ def get_user(request):
   # request.session.set_expiry(settings.SESSION_COOKIE_AGE)
   
   # set up CSRF protection if needed
-  if not request.session.has_key('csrf_token') or type(request.session['csrf_token']) != str:
+  if not request.session.has_key('csrf_token') or (type(request.session['csrf_token']) != str and type(request.session['csrf_token']) != unicode):
     request.session['csrf_token'] = str(uuid.uuid4())
 
   if request.session.has_key('user'):