--- a/trunk/Toss/Solver/Assignments.ml
+++ b/trunk/Toss/Solver/Assignments.ml
@@ -156,7 +156,10 @@
 
 
 (* We need order on variables and elements. We assume FO < SO < Real! *)
-let compare_vars x y = -1 * String.compare x y
+let compare_vars x y = 
+  if (x <> "" && y <> "" && x.[0] = '.' && y.[0] <> '.') then -1 else
+    if (x <> "" && y <> "" && x.[0] <> '.' && y.[0] = '.') then 1 else
+      -1 * String.compare x y
 let compare_elems = Structure.compare_elems
 
 (* Helper function: mapping on second position in a list of pairs. *)