Fixed AJAX for new schema