             @$value2 = @$('[name=value-2]').hide()
 
         getValue: ->
+            value = parseFloat @$value.val()
             if /range/.test @getOperator()
-                [@$value.val(), @$value2.val()]
-            else
-                @$value.val()
-
-        setValue: ->
-            value = @node.get 'value'
-            if /range/.test @node.get 'operator'
+                value2 = parseFloat @$value2.val()
+                [value, value2]
+            else
+                value
+
+        setValue: (value) ->
+            if /range/.test @getOperator()
                 @$value.val value[0]
                 @$value2.val value[1]
             else


        preventDefault: (event) ->
            event.preventDefault()

        getValue: (options) ->
            @$value.val()

        initialize: (options) ->
            @options = options

            @deferredEvents = $.Deferred()

            # Subscribe to edits for nodes relating to this DataField
            mediator.subscribe "datacontext/#{ @model.id }/edit", (node) =>
                if node is @node then return
                @set(node)

