Should have fixed AJAX bug