fixed AJAX methods.