                 return null
             else
                 return Utils.formatDecimal(ret, precision)
-                
-        order.quantity = coalesce data.quantity, 
-            order.quantity, $scope.market.quantity_precision
-        
-        collateral_ratio = data.collateral_ratio + data.collateral_ratio *
-            Math.abs(makeweight)\
-            if data.collateral_ratio
-        order.collateral_ratio = coalesce collateral_ratio, 
-            order.collateral_ratio, $scope.market.price_precision
-        
-        order.short_price_limit = coalesce data.price_limit, 
-            order.short_price_limit, $scope.market.price_precision
+
+        order.quantity = coalesce data.quantity, order.quantity, $scope.market.quantity_precision
+
+        collateral_ratio = data.collateral_ratio + data.collateral_ratio * Math.abs(makeweight)
+        if data.collateral_ratio
+            order.collateral_ratio = coalesce collateral_ratio, order.collateral_ratio, $scope.market.price_precision
+
+        order.short_price_limit = coalesce data.price_limit, order.short_price_limit, $scope.market.price_precision
 
         price = data.price + data.price * makeweight if data.price
         order.price = coalesce price, order.price, $scope.market.price_precision
-        
+
         switch $state.current.name
             when "market.buy" then $scope.order_change()
             when "market.sell" then $scope.order_change()
             when "market.short" then $scope.short_change()
-            else throw Error("Unknown $state.current.name",$state.current.name)
+            else
+                throw Error("Unknown $state.current.name", $state.current.name)
 
     $scope.scroll_buysell = ->
         return null if $("#order_tabs").position().top > 0

                original_order = order
                #console.log order
                order = angular.copy(order)
#                if !current_market.inverted
#                    order = order.invert()
                scope.v = {quantity: order.quantity, total: order.quantity}
                scope.cancel = ->
                    modalInstance.dismiss "cancel"

        $scope.clear_form_errors(form)
        short = $scope.short.clone_and_normalize()
        short.price = $scope.market.shorts_price

        #make sure user sees the correct cost (ng-change vrs watch work-around)
        previous = $scope.short.cost
        $scope.short_change()
