 public func ><T>(left: Attribute<T>, right: T) -> NSComparisonPredicate {
     return NSComparisonPredicate(
         leftExpression: left.expression,
-        rightExpression: left.expressionForValue(right),
+        rightExpression: expressionForValue(right),
         modifier: .DirectPredicateModifier,
         type: .GreaterThanPredicateOperatorType,
         options: left.comparisonPredicateOptions()

    public func endsWith(value: T) -> NSComparisonPredicate {
        return NSComparisonPredicate(
            leftExpression: self.expression,
            rightExpression: self.expressionForValue(value),
            modifier: .DirectPredicateModifier,
            type: .EndsWithPredicateOperatorType,
            options: self.comparisonPredicateOptions()

public func ~=<T>(left: Attribute<T>, right: T) -> NSComparisonPredicate {
    return NSComparisonPredicate(
        leftExpression: left.expression,
        rightExpression: expressionForValue(right),
        modifier: .DirectPredicateModifier,
        type: .LikePredicateOperatorType,
        options: left.comparisonPredicateOptions()
