Tweaked AJAX command structure.

Pretty sure I got this wrong the first pass.