Changed AJAX check