         stateSelect.removeClass('required')
 
     ($ '#bcountry select').change ->
-      updateState 'b'
+      Spree.updateState 'b'
 
     ($ '#scountry select').change ->
-      updateState 's'
+      Spree.updateState 's'
 
-    updateState 'b'
+    Spree.updateState 'b'
 
     order_use_billing = ($ 'input#order_use_billing')
     order_use_billing.change ->

    getCountryId = (region) ->
      $('#' + region + 'country select').val()

    updateState = (region) ->
      countryId = getCountryId(region)
      if countryId?
        unless Spree.Checkout[countryId]?

      else
        ($ '#shipping .inner').show()
        ($ '#shipping .inner input, #shipping .inner select').prop 'disabled', false
        Spree.updateState('s')
    
    update_shipping_form_state order_use_billing
