diff --git a/notifications.module b/notifications.module
index c4be8d5..fda1402 100644
--- a/notifications.module
+++ b/notifications.module
@@ -980,7 +980,7 @@ function notifications_array_serialize($array) {
     }
   }
   // Now we sort the whole condtions array maintaining index association
-  ksort($array);
+  ksort($array, SORT_STRING);
   return implode(',', array_keys($array)) . '/' . implode(',', $array);
 }
 
