More AJAX fixes