fix some error in Xcode 6.1.1
-  change toRaw() to rawValue
-  fix "ambiguous use of operator '>' " in sorted function