Fixed AJAX calls and added an extra one