Fixing a bug that would cause AJAX stuff to be borked

Signed-off-by: Jeremy Massel <jeremy@ignitionmedia.ca>