 
             json =
                 namespace: @namespace.toJSON()
-                shards: compute_renderable_shards_array(@shard_boundaries)
+                shards: compute_renderable_shards_array(@shard_set)
 
             super validator_options, json
 
-            shard_views = _.map(compute_renderable_shards_array(@shard_boundaries), (shard) => new NamespaceView.ModifyShardsModalShard @namespace, shard, @)
+            shard_views = _.map(compute_renderable_shards_array(@shard_set), (shard) => new NamespaceView.ModifyShardsModalShard @namespace, shard, @)
             @.$('.shards tbody').append view.render().el for view in shard_views
 
     class @ModifyShardsModalShard extends Backbone.View

        alert_tmpl: Handlebars.compile $('#modify_shards-alert-template').html()
        class: 'modify-shards'

        initialize: (namespace, shard_boundaries) ->
            log_initial '(initializing) modal dialog: ModifyShards'
            @namespace = namespace
            @shards = compute_renderable_shards_array(shard_boundaries)

            # Keep an unmodified copy of the shard boundaries with which we compare against when reviewing the changes.
            @original_shard_boundaries = _.map(shard_boundaries, _.identity)
            @shard_boundaries = _.map(shard_boundaries, _.identity)
            super @template

        insert_splitpoint: (index, splitpoint) =>
            if ((index == @shard_boundaries.length || @shard_boundaries[index] > splitpoint) && (index == 0 || @shard_boundaries[index - 1] < splitpoint))
                @shard_boundaries.splice(index, 0, splitpoint)
                clear_modals()
                @render()
            else
                # TODO handle error

        merge_shard: (index) =>
            @shard_boundaries.splice(index, 1)
            clear_modals()
            @render()


                rules: { }
                messages: { }
                submitHandler: =>
                    formdata = form_data_as_object($('form', @$modal))
                    # TODO detect when there are no changes.
                    $.ajax
                        processData: false
                        url: "/ajax/#{@namespace.attributes.protocol}_namespaces/#{@namespace.id}"
                        type: 'POST'
                        contentType: 'application/json'
                        data: JSON.stringify({"shards": @shard_set})

                        success: (response) =>
                            clear_modals()
